Class: FormForms::Elements::TableHeaderField

Inherits:
Field show all
Defined in:
lib/form_forms/elements/table_header_field.rb

Instance Attribute Summary

Attributes inherited from BaseElement

#elements

Instance Method Summary collapse

Methods inherited from BaseElement

#delete

Constructor Details

#initialize(cell_args = {}, &generator) ⇒ TableHeaderField

Returns a new instance of TableHeaderField.



4
5
6
7
# File 'lib/form_forms/elements/table_header_field.rb', line 4

def initialize(cell_args={}, &generator)
  self.cell_args cell_args
  super(&generator)
end

Instance Method Details

#render(builder, view) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/form_forms/elements/table_header_field.rb', line 11

def render(builder, view)
  cell_args = eval_property(:cell_args, builder, view)

  view.(:th, cell_args) do
    super
  end
end