Module: Godmin::Resources::ResourceService::BatchActions
- Extended by:
- ActiveSupport::Concern
- Included in:
- Godmin::Resources::ResourceService
- Defined in:
- lib/godmin/resources/resource_service/batch_actions.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#batch_action(action, records) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/godmin/resources/resource_service/batch_actions.rb', line 9 def batch_action(action, records) if batch_action?(action) send("batch_action_#{action}", records) true else false end end |
#batch_action?(action) ⇒ Boolean
18 19 20 |
# File 'lib/godmin/resources/resource_service/batch_actions.rb', line 18 def batch_action?(action) batch_action_map.key?(action.to_sym) end |