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



15
16
17
# File 'lib/tao_ui/components/table_component.rb', line 15

def self.component_name
  :table
end

Instance Method Details

#render(&block) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/tao_ui/components/table_component.rb', line 5

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