module AbstractController::Callbacks::ClassMethods

def _normalize_callback_options(options)

* except - The callback should be run for all actions except this action
* only - The callback should be run only for this action
==== Options

a Rails process.
proc is only evaluated once per action for the lifetime of
:if => proc {|c| c.action_name == "index" }, but that the
The basic idea is that :only => :index gets converted to
primitive form (:per_key) used by ActiveSupport::Callbacks.
If :only or :except are used, convert the options into the
def _normalize_callback_options(options)
  if only = options[:only]
    only = Array(only).map {|o| "action_name == '#{o}'"}.join(" || ")
    options[:per_key] = {:if => only}
  end
  if except = options[:except]
    except = Array(except).map {|e| "action_name == '#{e}'"}.join(" || ")
    options[:per_key] = {:unless => except}
  end
end