formulate 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/formulate/form_helper.rb +9 -1
- data/lib/formulate/version.rb +1 -1
- metadata +1 -1
@@ -4,9 +4,17 @@ module Formulate
|
|
4
4
|
|
5
5
|
def form_for(record, options={}, &proc)
|
6
6
|
options[:html] ||= {}
|
7
|
-
|
7
|
+
|
8
|
+
case record
|
9
|
+
when String, Symbol
|
10
|
+
options[:html][:class] ||= ''
|
11
|
+
else
|
12
|
+
apply_form_for_options!(record, options)
|
13
|
+
end
|
14
|
+
|
8
15
|
options[:html][:class] << ' formulate'
|
9
16
|
options[:html][:class] << " #{options[:class]}" if options[:class]
|
17
|
+
options[:html][:class].strip!
|
10
18
|
|
11
19
|
original_field_error_proc = ::ActionView::Base.field_error_proc
|
12
20
|
::ActionView::Base.field_error_proc = FIELD_ERROR_PROC
|
data/lib/formulate/version.rb
CHANGED