Class: Admin::ManagerController
- Includes:
- AbAdmin::Controllers::Tree
- Defined in:
- app/controllers/admin/manager_controller.rb
Instance Method Summary collapse
Methods included from AbAdmin::Controllers::Tree
Instance Method Details
#custom_action ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/controllers/admin/manager_controller.rb', line 8 def custom_action custom_action = manager.custom_action_for(params[:custom_action], self) if custom_action.[:method] && custom_action.[:method] != request.method_symbol raise ActionController::RoutingError.new("AbAdmin custom action #{custom_action.[:method].to_s.upcase} #{params[:custom_action]} not allowed for #{request.method_symbol} method") end instance_exec(&custom_action.data) end |