Just like we sometimes override options in the generic table actions component, we're going to do the same thing with the cards table actions.
16 lines
371 B
Ruby
16 lines
371 B
Ruby
class Admin::Widget::Cards::TableComponent < ApplicationComponent
|
|
attr_reader :cards, :no_cards_message, :options
|
|
|
|
def initialize(cards, no_cards_message:, **options)
|
|
@cards = cards
|
|
@no_cards_message = no_cards_message
|
|
@options = options
|
|
end
|
|
|
|
private
|
|
|
|
def attribute_name(attribute)
|
|
::Widget::Card.human_attribute_name(attribute)
|
|
end
|
|
end
|