better_form 0.6.3 → 0.6.4
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.
- data/lib/better_form/version.rb +1 -1
- data/lib/better_form/view_helper.rb +6 -0
- metadata +2 -2
data/lib/better_form/version.rb
CHANGED
@@ -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.
|
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-
|
12
|
+
date: 2011-06-06 00:00:00.000000000 +10:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
description:
|