lib/cancan/controller_additions.rb
# Skip the loading behavior of CanCan. This is useful when using +load_and_authorize_resource+ but want to
# only do authorization on certain actions. You can pass :only and :except options to specify which actions to
# skip the effects on. It will apply to all actions by default.
#
#   class ProjectsController < ApplicationController
#     load_and_authorize_resource
#     skip_load_resource :only => :index
#   end
#
# You can also pass the resource name as the first argument to skip that resource.
Skip the loading behavior of CanCan. This is useful when using +load_and_authorize_resource+ but want to
only do authorization on certain actions. You can pass :only and :except options to specify which actions to
skip the effects on. It will apply to all actions by default.



You can also pass the resource name as the first argument to skip that resource.
Skip the loading behavior of CanCan . This is useful when using + load_and_authorize_resource + but want to only do authorization on certain actions . You can pass : only and : except options to specify which actions to skip the effects on . It will apply to all actions by default . You can also pass the resource name as the first argument to skip that resource .
def skip_load_resource(*args)
        options = args.extract_options!
        name = args.first
        cancan_skipper[:load][name] = options
      end
def skip_load_resource ( * args ) options = args . extract_options! name = args . first cancan_skipper [ :load ] [ name ] = options end
Skip the loading behavior of CanCan.
Skip the loading behavior of CanCan .
args