Class: UI::TableRowComponent

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

Instance Method Summary collapse

Methods included from TableRowBehavior

#render_row, #row_classes, #row_html_attributes

Constructor Details

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

Returns a new instance of TableRowComponent.



13
14
15
16
# File 'app/view_components/ui/table_row_component.rb', line 13

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

Instance Method Details

#callObject



18
19
20
21
22
# File 'app/view_components/ui/table_row_component.rb', line 18

def call
   :tr, **row_html_attributes.deep_merge(@attributes) do
    safe_join([heads, cells].flatten.compact)
  end
end