Class: Admin::ManagerController

Inherits:
BaseController
  • Object
show all
Includes:
AbAdmin::Controllers::Tree, AbAdmin::Utils::EvalHelpers
Defined in:
app/controllers/admin/manager_controller.rb

Instance Method Summary collapse

Methods included from AbAdmin::Controllers::Tree

#rebuild

Methods included from AbAdmin::Utils::EvalHelpers

#call_method_or_proc_on, #evaluate_method

Instance Method Details

#custom_actionObject


11
12
13
14
15
16
17
# File 'app/controllers/admin/manager_controller.rb', line 11

def custom_action
  custom_action = manager.custom_action_for(params[:custom_action], self)
  if custom_action.options[:method] && custom_action.options[:method] != request.method_symbol
    raise ActionController::RoutingError.new("AbAdmin custom action for #{params[:custom_action]} not found")
  end
  instance_exec(&custom_action.data)
end