Module: Godmin::Resource::BatchActions::ClassMethods

Defined in:
lib/godmin/resource/batch_actions.rb

Instance Method Summary collapse

Instance Method Details

#batch_action(attr, options = {}) ⇒ Object



35
36
37
38
39
40
41
# File 'lib/godmin/resource/batch_actions.rb', line 35

def batch_action(attr, options = {})
  batch_action_map[attr] = {
    only: nil,
    except: nil,
    confirm: false
  }.merge(options)
end

#batch_action_mapObject



31
32
33
# File 'lib/godmin/resource/batch_actions.rb', line 31

def batch_action_map
  @batch_action_map ||= {}
end