formulate 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,9 +4,17 @@ module Formulate
4
4
 
5
5
  def form_for(record, options={}, &proc)
6
6
  options[:html] ||= {}
7
- apply_form_for_options!(record, options)
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
@@ -1,3 +1,3 @@
1
1
  module Formulate
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formulate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: