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



41
42
43
44
45
46
47
# File 'lib/godmin/resources/resource_service/batch_actions.rb', line 41

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

#batch_action_mapObject



37
38
39
# File 'lib/godmin/resources/resource_service/batch_actions.rb', line 37

def batch_action_map
  @batch_action_map ||= {}
end