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
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#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.
15 16 17 18 19 |
# File 'app/tables/mensa/action.rb', line 15 def initialize(name, config:, table:) @name = name @table = table @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
13 14 15 |
# File 'app/tables/mensa/action.rb', line 13 def config @config end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
13 14 15 |
# File 'app/tables/mensa/action.rb', line 13 def name @name end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
13 14 15 |
# File 'app/tables/mensa/action.rb', line 13 def table @table end |