bootstrap_builder 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A Rails form builder that generates [Twitter Bootstrap](http://twitter.github.com/bootstrap) markup and helps keep your code clean.
4
4
 
5
- * Includes Twiter Bootstrap 2.0 CSS and Javascript files
5
+ * Includes Twiter Bootstrap 2.0.2 CSS and Javascript files
6
6
  * Uses existing Rails helpers
7
7
  * Auto-generates labels
8
8
  * Generates horizontal, vertical and inline forms
@@ -34,6 +34,17 @@ Require it in your Javascript manifest file if you want to use Bootstrap's jQuer
34
34
  ``` css
35
35
  //= require bootstrap
36
36
  ```
37
+
38
+ ## Configuration
39
+
40
+ You can change the default configuration of this gem by adding the following code to you initializers:
41
+
42
+ ``` ruby
43
+ BootstrapBuilder.configure do |conf|
44
+ conf.default_form_class = 'form-vertical' # Set the form class. Default is 'form-horizontal'
45
+ end
46
+ ```
47
+
37
48
  ## Usage (with haml)
38
49
 
39
50
  Use `bootstrap_form_for` when you want to render a form with Bootstrap markup.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bootstrap_builder"
8
- s.version = "0.2.4"
8
+ s.version = "0.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jack Neto", "The Working Group Inc."]
@@ -149,6 +149,8 @@ module BootstrapBuilder
149
149
  def fields_for(record_or_name_or_array, *args, &block)
150
150
  options = args.extract_options!
151
151
  options[:builder] ||= BootstrapBuilder::Builder
152
+ options[:html] ||= {}
153
+ options[:html][:class] ||= self.options[:html] && self.options[:html][:class]
152
154
  super(record_or_name_or_array, *(args << options), &block)
153
155
  end
154
156
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: