lib/pundit/controller_additions.rb
def cancan_resource_class
        if ancestors.map(&:to_s).include? 'InheritedResources::Actions'
          InheritedResource
        else
          ControllerResource
        end
      end
# Sets up a before filter which loads and authorizes the current resource. This performs both
# load_resource and authorize_resource and accepts the same arguments. See those methods for details.
#
#   class BooksController < ApplicationController
#     load_and_authorize_resource
#   end
#
Sets up a before filter which loads and authorizes the current resource. This performs both
load_resource and authorize_resource and accepts the same arguments. See those methods for details.


Sets up a before filter which loads and authorizes the current resource . This performs both load_resource and authorize_resource and accepts the same arguments . See those methods for details .
def cancan_resource_class
        if ancestors.map(&:to_s).include? 'InheritedResources::Actions'
          InheritedResource
        else
          ControllerResource
        end
      end
def cancan_resource_class if ancestors . map ( & :to_s ) . include? 'InheritedResources::Actions' InheritedResource else ControllerResource end end
Sets up a before filter which loads and authorizes the current resource.
Sets up a before filter which loads and authorizes the current resource .