class TaoUi::Components::TableComponent
Public Class Methods
component_name()
click to toggle source
# File lib/tao_ui/components/table_component.rb, line 15 def self.component_name :table end
Public Instance Methods
render(&block)
click to toggle source
Calls superclass method
# File lib/tao_ui/components/table_component.rb, line 5 def render &block if block_given? table_content = view.capture(builder, &block) table = view.content_tag('table', table_content, class: 'table') view.content_tag tag_name, table, html_options else super end end
Private Instance Methods
builder()
click to toggle source
# File lib/tao_ui/components/table_component.rb, line 21 def builder @builder ||= Table::TableBuilder.new(view, { expandable: options[:expandable], selectable: options[:selectable] }) end
default_options()
click to toggle source
# File lib/tao_ui/components/table_component.rb, line 28 def default_options {class: 'tao-table'} end