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