Class: UI::TableBodyComponent

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
TableBodyBehavior
Defined in:
app/view_components/ui/table_body_component.rb

Instance Method Summary collapse

Methods included from TableBodyBehavior

#body_classes, #body_html_attributes, #render_body

Constructor Details

#initialize(classes: "", **attributes) ⇒ TableBodyComponent

Returns a new instance of TableBodyComponent.



11
12
13
14
# File 'app/view_components/ui/table_body_component.rb', line 11

def initialize(classes: "", **attributes)
  @classes = classes
  @attributes = attributes
end

Instance Method Details

#call ⇒ Object



16
17
18
19
20
# File 'app/view_components/ui/table_body_component.rb', line 16

def call
   :tbody, **body_html_attributes.deep_merge(@attributes) do
    safe_join(rows)
  end
end