better_form 0.6.3 → 0.6.4

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.3"
2
+ VERSION = "0.6.4"
3
3
  end
@@ -3,6 +3,12 @@ module BetterForm
3
3
  def better_form_for(record_or_name_or_array, *args, &proc)
4
4
  options = args.extract_options!.reverse_merge(:builder => BetterForm::Builder)
5
5
 
6
+ # Call apply_form_for_options! here to have Rails set the class, id and method for the form as usual
7
+ # We need to call this here (rather than implicitly through the later form_for call) because
8
+ # apply_form_for_options! uses reverse_merge!, so out better_form class would override the new_whatever or
9
+ # edit_whatever class applied by Rails
10
+ apply_form_for_options!(record_or_name_or_array, options)
11
+
6
12
  # Add the class 'better_form' to the list of classes for this form
7
13
  options[:html] ||= {}
8
14
  options[:html][:class] = "#{options[:html][:class]} better_form"
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.3
4
+ version: 0.6.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-05-31 00:00:00.000000000 +10:00
12
+ date: 2011-06-06 00:00:00.000000000 +10:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
  description: