Class: Mensa::BatchAction
- Inherits:
-
Object
- Object
- Mensa::BatchAction
- Includes:
- ConfigReaders
- Defined in:
- app/tables/mensa/batch_action.rb
Overview
Represents a batch action that can be applied to multiple selected records.
batch :archive do
title "Archive"
process { |records| records.update_all(archived: true) }
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:) ⇒ BatchAction
constructor
A new instance of BatchAction.
Constructor Details
#initialize(name, config:, table:) ⇒ BatchAction
Returns a new instance of BatchAction.
17 18 19 20 21 |
# File 'app/tables/mensa/batch_action.rb', line 17 def initialize(name, config:, table:) @name = name @table = table @config = config end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
15 16 17 |
# File 'app/tables/mensa/batch_action.rb', line 15 def name @name end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
15 16 17 |
# File 'app/tables/mensa/batch_action.rb', line 15 def table @table end |