module ActiveAdmin::Callbacks
Private Instance Methods
run_callback(method, *args)
click to toggle source
Simple callback system. Implements before and after callbacks for use within the controllers.
We didn't use the ActiveSupport callbacks because they do not support passing in any arbitrary object into the callback method (which we need to do)
# File lib/active_admin/callbacks.rb, line 14 def run_callback(method, *args) case method when Symbol send(method, *args) when Proc instance_exec(*args, &method) else raise "Please register with callbacks using a symbol or a block/proc." end end