Module: SimpleBootstrapForm::ActionViewExtensions
- Defined in:
- lib/simple_bootstrap_form/action_view_extensions.rb
Instance Method Summary collapse
Instance Method Details
#bootstrap_form_for(record, options = {}, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/simple_bootstrap_form/action_view_extensions.rb', line 4 def bootstrap_form_for(record, ={}, &block) [:builder] ||= SimpleBootstrapForm::FormBuilder [:html] ||= {} [:html][:class] = CssClassList.new [:html][:class] [:html][:class] << 'form-horizontal' [:html][:role] ||= 'form' prevent_action_view_putting_a_div_around_all_fields_with_errors do form_for record, , &block end end |