Class: FormForms::Elements::TableHeader
- Inherits:
-
BaseElement
- Object
- BaseElement
- FormForms::Elements::TableHeader
- Defined in:
- lib/form_forms/elements/table_header.rb
Instance Attribute Summary
Attributes inherited from BaseElement
Instance Method Summary collapse
-
#initialize(row_args = {}) ⇒ TableHeader
constructor
A new instance of TableHeader.
- #render(builder, view) ⇒ Object
Methods inherited from BaseElement
Constructor Details
#initialize(row_args = {}) ⇒ TableHeader
Returns a new instance of TableHeader.
6 7 8 9 |
# File 'lib/form_forms/elements/table_header.rb', line 6 def initialize(row_args={}) self.row_args row_args super end |
Instance Method Details
#render(builder, view) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/form_forms/elements/table_header.rb', line 13 def render(builder, view) return "" if self.elements.empty? row_args = eval_property(:row_args, builder, view) view.content_tag(:tr, row_args) do super end end |