diff --git a/lib/cancan/controller_resource.rb b/lib/cancan/controller_resource.rb index 49c57fd..7ecb32c 100644 --- a/lib/cancan/controller_resource.rb +++ b/lib/cancan/controller_resource.rb @@ -6,7 +6,7 @@ module CanCan options = args.extract_options! resource_name = args.first controller_class.before_filter(options.slice(:only, :except)) do |controller| - ControllerResource.new(controller, resource_name, options.except(:only, :except)).send(method) + self.class.cancan_resource_class.new(controller, resource_name, options.except(:only, :except)).send(method) end end