Module: Binco::FormHelper
- Defined in:
- app/helpers/binco/form_helper.rb
Instance Method Summary collapse
- #bootstrap_form_for(record, options = {}, &block) ⇒ Object
- #bootstrap_form_tag(url_for_options = {}, options = {}, &block) ⇒ Object
- #bootstrap_form_with(model: nil, scope: nil, url: nil, format: nil, **options, &block) ⇒ Object
- #materialize_form_for(record, options = {}, &block) ⇒ Object
- #materialize_form_tag(url_for_options = {}, options = {}, &block) ⇒ Object
Instance Method Details
#bootstrap_form_for(record, options = {}, &block) ⇒ Object
3 4 5 6 |
# File 'app/helpers/binco/form_helper.rb', line 3 def bootstrap_form_for(record, = {}, &block) [:builder] = BootstrapFormBuilder form_for(record, , &block) end |
#bootstrap_form_tag(url_for_options = {}, options = {}, &block) ⇒ Object
18 19 20 21 22 |
# File 'app/helpers/binco/form_helper.rb', line 18 def bootstrap_form_tag( = {}, = {}, &block) [:acts_like_form_tag] = true [:url] = bootstrap_form_for("", , &block) end |
#bootstrap_form_with(model: nil, scope: nil, url: nil, format: nil, **options, &block) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'app/helpers/binco/form_helper.rb', line 8 def bootstrap_form_with(model: nil, scope: nil, url: nil, format: nil, **, &block) [:builder] = BootstrapFormBuilder if block_given? form_with(model: model, scope: scope, url: url, format: format, **, &block) else form_with(model: model, scope: scope, url: url, format: format, **) end end |
#materialize_form_for(record, options = {}, &block) ⇒ Object
24 25 26 27 |
# File 'app/helpers/binco/form_helper.rb', line 24 def materialize_form_for(record, = {}, &block) [:builder] = MaterializeFormBuilder form_for(record, , &block) end |
#materialize_form_tag(url_for_options = {}, options = {}, &block) ⇒ Object
29 30 31 32 33 |
# File 'app/helpers/binco/form_helper.rb', line 29 def materialize_form_tag( = {}, = {}, &block) [:acts_like_form_tag] = true [:url] = materialize_form_for("", , &block) end |