Method: CanCan::ControllerAdditions::ClassMethods#skip_authorization_check
- Defined in:
- lib/cancan/controller_additions.rb
#skip_authorization_check(*args) ⇒ Object
Call this in the class of a controller to skip the check_authorization behavior on the actions.
class HomeController < ApplicationController
:only => :index
end
Any arguments are passed to the before_filter it triggers.
267 268 269 270 271 |
# File 'lib/cancan/controller_additions.rb', line 267 def (*args) self.before_filter(*args) do |controller| controller.instance_variable_set(:@_authorized, true) end end |