module AbstractController::Callbacks::ClassMethods
def _normalize_callback_options(options)
* only - The callback should be run only for this action.
==== Options
except: :index, if: -> { true } # the :except option will be ignored.
are used together.
Note that :if has priority over :except in case they
only: :index, if: -> { true } # the :if option will be ignored.
are used together.
Note that :only has priority over :if in case they
:if => proc {|c| c.action_name == "index" }.
The basic idea is that :only => :index gets converted to
+:if+ and +:unless+ options of ActiveSupport::Callbacks.
If +:only+ or +:except+ are used, convert the options into the
def _normalize_callback_options(options) _normalize_callback_option(options, :only, :if) _normalize_callback_option(options, :except, :unless) end