Class: RailsBootstrapForm::BootstrapFormBuilder
- Inherits:
-
ActionView::Helpers::FormBuilder
- Object
- ActionView::Helpers::FormBuilder
- RailsBootstrapForm::BootstrapFormBuilder
- Includes:
- FieldWrapperBuilder, Helpers, InputGroupBuilder, Inputs
- Defined in:
- lib/rails_bootstrap_form/bootstrap_form_builder.rb
Instance Attribute Summary collapse
-
#bootstrap_form_options ⇒ Object
Returns the value of attribute bootstrap_form_options.
Instance Method Summary collapse
- #fields_for(record_name, record_object = nil, fields_options = {}, &block) ⇒ Object
-
#initialize(object_name, object, template, options) ⇒ BootstrapFormBuilder
constructor
A new instance of BootstrapFormBuilder.
Constructor Details
#initialize(object_name, object, template, options) ⇒ BootstrapFormBuilder
Returns a new instance of BootstrapFormBuilder.
20 21 22 23 24 25 |
# File 'lib/rails_bootstrap_form/bootstrap_form_builder.rb', line 20 def initialize(object_name, object, template, ) @bootstrap_form_options = RailsBootstrapForm::BootstrapFormOptions.new([:bootstrap]) () apply_default_form_classes() super(object_name, object, template, ) end |
Instance Attribute Details
#bootstrap_form_options ⇒ Object
Returns the value of attribute bootstrap_form_options.
18 19 20 |
# File 'lib/rails_bootstrap_form/bootstrap_form_builder.rb', line 18 def @bootstrap_form_options end |
Instance Method Details
#fields_for(record_name, record_object = nil, fields_options = {}, &block) ⇒ Object
27 28 29 30 31 |
# File 'lib/rails_bootstrap_form/bootstrap_form_builder.rb', line 27 def fields_for(record_name, record_object = nil, = {}, &block) = (record_object, ) record_object = nil if record_object.is_a?(Hash) && record_object. super(record_name, record_object, , &block) end |