Class: Mensa::Format

Inherits:
Object
  • Object
show all
Includes:
ConfigReaders
Defined in:
app/tables/mensa/format.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 Method Summary collapse

Constructor Details

#initialize(config:, column:) ⇒ Format

Returns a new instance of Format.



18
19
20
21
# File 'app/tables/mensa/format.rb', line 18

def initialize(config:, column:)
  @column = column
  @config = self.class.definition.merge(config || {})
end