instance method
_normalize_callback_options
Ruby on Rails 4.1.16
Since v3.0.20Signature
_normalize_callback_options(options)
If :only or :except are used, convert the options into the :unless and :if options of ActiveSupport::Callbacks. The basic idea is that :only => :index gets converted to :if => proc {|c| c.action_name == “index” }.
Options
-
only- The callback should be run only for this action -
except- The callback should be run for all actions except this action
Parameters
-
optionsreq
Source
# File actionpack/lib/abstract_controller/callbacks.rb, line 33
def _normalize_callback_options(options)
_normalize_callback_option(options, :only, :if)
_normalize_callback_option(options, :except, :unless)
end
Defined in actionpack/lib/abstract_controller/callbacks.rb line 33
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in AbstractController::Callbacks::ClassMethods