Class: Mensa::Action
- Inherits:
-
Object
- Object
- Mensa::Action
- Includes:
- ConfigReaders
- Defined in:
- app/tables/mensa/action.rb
Overview
Provide additional links at the end of the row, with an icon, link and a name
action :delete do
link { |contact| delete_contact_path(contact) }
link_attributes "data-turbo-method" => "delete"
icon "fa-xmark"
end
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(name, config:, table:) ⇒ Action
constructor
A new instance of Action.
Constructor Details
#initialize(name, config:, table:) ⇒ Action
Returns a new instance of Action.
18 19 20 21 22 |
# File 'app/tables/mensa/action.rb', line 18 def initialize(name, config:, table:) @name = name @table = table @config = config end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'app/tables/mensa/action.rb', line 16 def name @name end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
16 17 18 |
# File 'app/tables/mensa/action.rb', line 16 def table @table end |