Module: ActionDispatch::Routing::Mapper::Resources
- Defined in:
- lib/express_admin/commandable.rb
Instance Method Summary collapse
- #resources_with_commandable(*resources, &block) ⇒ Object (also: #resources)
Instance Method Details
#resources_with_commandable(*resources, &block) ⇒ Object Also known as: resources
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/express_admin/commandable.rb', line 45 def resources_with_commandable(*resources, &block) unless @concerns[:commandable] concern :commandable, ExpressAdmin::Commandable.new end resources_without_commandable(*resources) do |resource| block.call(resource) unless block.nil? concerns :commandable end end |