Module: ViewComponent::TableComponent
- Included in:
- UiHelper
- Defined in:
- app/helpers/view_component/table_component.rb
Instance Method Summary collapse
- #table_actions(row_data, actions = []) ⇒ Object
- #table_cell_name(row_data, avatar: false) ⇒ Object
- #table_cell_role(row_data) ⇒ Object
Instance Method Details
#table_actions(row_data, actions = []) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/helpers/view_component/table_component.rb', line 13 def table_actions(row_data, actions = []) actions.each do |action| action[:data] ||= {} action[:data][:turbo_frame] = action[:turbo_frame] if action[:turbo_frame].present? end { partial: 'shared/components/table_actions', locals: { row_data:, actions: } } end |
#table_cell_name(row_data, avatar: false) ⇒ Object
5 6 7 |
# File 'app/helpers/view_component/table_component.rb', line 5 def table_cell_name(row_data, avatar: false) { partial: 'shared/components/table_cell_name', locals: { row_data:, avatar: } } end |
#table_cell_role(row_data) ⇒ Object
9 10 11 |
# File 'app/helpers/view_component/table_component.rb', line 9 def table_cell_role(row_data) { partial: 'shared/components/table_cell_role', locals: { row_data: } } end |