Class: TaoUi::Components::TableComponent

Inherits:
TaoOnRails::Components::Base
  • Object
show all
Defined in:
lib/tao_ui/components/table_component.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.component_nameObject



21
22
23
# File 'lib/tao_ui/components/table_component.rb', line 21

def self.component_name
  :table
end

Instance Method Details

#render(&block) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/tao_ui/components/table_component.rb', line 11

def render &block
  if block_given?
    table_content = view.capture(builder, &block)
    table = view.('table', table_content, class: 'table')
    view. tag_name, table, html_options
  else
    super
  end
end