Class: TaoUi::Components::Table::TableBuilder
- Inherits:
-
BaseBuilder
- Object
- BaseBuilder
- TaoUi::Components::Table::TableBuilder
- Defined in:
- lib/tao_ui/components/table/table_builder.rb
Instance Attribute Summary
Attributes inherited from BaseBuilder
#expandable, #options, #selectable, #view
Instance Method Summary collapse
Methods inherited from BaseBuilder
Constructor Details
This class inherits a constructor from TaoUi::Components::Table::BaseBuilder
Instance Method Details
#body(body_options = {}, &block) ⇒ Object
16 17 18 19 |
# File 'lib/tao_ui/components/table/table_builder.rb', line 16 def body = {}, &block body_content = view.capture(body_builder, &block) view.content_tag 'tbody', body_content, end |
#head(head_options = {}, &block) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/tao_ui/components/table/table_builder.rb', line 7 def head = {}, &block head_content = view.capture(head_builder, &block) head_content = selectable_th + head_content if selectable head_content = + head_content if view.content_tag 'thead', do view.content_tag 'tr', head_content end end |