Class: Koi::OrdinalTableComponent
- Inherits:
-
Tables::TableComponent
- Object
- Katalyst::Turbo::TableComponent
- Tables::TableComponent
- Koi::OrdinalTableComponent
- Includes:
- Katalyst::Tables::Orderable
- Defined in:
- app/components/koi/ordinal_table_component.rb
Instance Method Summary collapse
- #before_render ⇒ Object
- #call ⇒ Object
-
#initialize(collection:, id: "index-table", url: [:order, :admin, collection], scope: "order[#{collection.model_name.plural}]", **options) ⇒ OrdinalTableComponent
constructor
A new instance of OrdinalTableComponent.
Constructor Details
#initialize(collection:, id: "index-table", url: [:order, :admin, collection], scope: "order[#{collection.model_name.plural}]", **options) ⇒ OrdinalTableComponent
Returns a new instance of OrdinalTableComponent.
7 8 9 10 11 12 13 14 15 16 |
# File 'app/components/koi/ordinal_table_component.rb', line 7 def initialize(collection:, id: "index-table", url: [:order, :admin, collection], scope: "order[#{collection.model_name.plural}]", **) super(collection:, id:, class: "index-table", caption: true, **) @url = url @scope = scope end |
Instance Method Details
#before_render ⇒ Object
18 19 20 |
# File 'app/components/koi/ordinal_table_component.rb', line 18 def before_render with_orderable(url: @url, scope: @scope) unless orderable? end |
#call ⇒ Object
22 23 24 25 |
# File 'app/components/koi/ordinal_table_component.rb', line 22 def call concat(render_parent) concat(orderable) end |