Module: Godmin::Resources::ResourceService::BatchActions::ClassMethods

Defined in:
lib/godmin/resources/resource_service/batch_actions.rb

Instance Method Summary collapse

Instance Method Details

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



27
28
29
30
31
32
33
# File 'lib/godmin/resources/resource_service/batch_actions.rb', line 27

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

#batch_action_mapObject



23
24
25
# File 'lib/godmin/resources/resource_service/batch_actions.rb', line 23

def batch_action_map
  @batch_action_map ||= {}
end