Module | AbstractController::Callbacks::ClassMethods |
In: |
lib/abstract_controller/callbacks.rb
|
Take callback names and an optional callback proc, normalize them, then call the block with each callback. This allows us to abstract the normalization across several methods that use it.
If :only or :except are used, convert the options into the primitive form (:per_key) used by ActiveSupport::Callbacks. The basic idea is that :only => :index gets converted to :if => proc {|c| c.action_name == "index" }, but that the proc is only evaluated once per action for the lifetime of a Rails process.
Skip before, after, and around filters matching any of the names