better_form 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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: