Module: MNE::TwitterBootstrapFormBuilder::Helper
- Defined in:
- lib/twitter-bootstrap-form-builder/helper.rb
Instance Method Summary collapse
Instance Method Details
#form_for(record, options = {}, &proc) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/twitter-bootstrap-form-builder/helper.rb', line 5 def form_for (record, = {}, &proc) return super(record, , &proc) if .delete(:bootstrap) === false [:builder] ||= MNE::TwitterBootstrapFormBuilder::FormBuilder [:html] ||= {} [:html][:class] ||= "" if ![:html][:class].match(/form-(horizontal|vertical)/) [:html][:class] = ["form-horizontal", [:html][:class]].join(" ") end super(record, , &proc) end |