Class: UI::TableRowComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::TableRowComponent
- Includes:
- TableRowBehavior
- Defined in:
- app/view_components/ui/table_row_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ TableRowComponent
constructor
A new instance of TableRowComponent.
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
#call ⇒ Object
18 19 20 21 22 |
# File 'app/view_components/ui/table_row_component.rb', line 18 def call content_tag :tr, **row_html_attributes.deep_merge(@attributes) do safe_join([heads, cells].flatten.compact) end end |