better_form 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module BetterForm
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
@@ -15,6 +15,17 @@ module BetterForm
15
15
  form_for(record_or_name_or_array, *(args << options), &proc)
16
16
  end
17
17
 
18
+ def better_fields_for(record_or_name_or_array, *args, &proc)
19
+ options = args.extract_options!.reverse_merge(:builder => BetterForm::Builder)
20
+
21
+ # Extract the better_form specific 'label' and 'validate_all' options
22
+ @label_all = options.delete(:label)
23
+ @validate_all = options.delete(:validate)
24
+
25
+ # Call the standard Rails fields_for with our updated options
26
+ fields_for(record_or_name_or_array, *(args << options), &proc)
27
+ end
28
+
18
29
  def label_all?
19
30
  @label_all
20
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: