Class: FormForms::Elements::Fields
- Inherits:
-
SubForm
- Object
- BaseElement
- SubForm
- FormForms::Elements::Fields
- Defined in:
- lib/form_forms/elements/fields.rb
Instance Attribute Summary
Attributes inherited from BaseElement
Instance Method Summary collapse
-
#initialize(association, form_args = {}) ⇒ Fields
constructor
A new instance of Fields.
- #render(builder, view) ⇒ Object
Methods inherited from BaseElement
Constructor Details
#initialize(association, form_args = {}) ⇒ Fields
Returns a new instance of Fields.
4 5 6 7 8 |
# File 'lib/form_forms/elements/fields.rb', line 4 def initialize(association, form_args={}) self.association association self.args form_args super end |
Instance Method Details
#render(builder, view) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/form_forms/elements/fields.rb', line 13 def render(builder, view) association = eval_property(:association, builder, view) form_args = eval_property(:args, builder, view) builder.association(association, form_args) do |sub_builder| super(sub_builder, view) end end |