fetch cancan_resource_class through controller class from ControllerResource

This commit is contained in:
Ryan Bates 2010-09-16 16:01:58 -07:00
parent 7e0e72276e
commit cef55c95e7

View File

@ -6,7 +6,7 @@ module CanCan
options = args.extract_options!
resource_name = args.first
controller_class.before_filter(options.slice(:only, :except)) do |controller|
self.class.cancan_resource_class.new(controller, resource_name, options.except(:only, :except)).send(method)
controller.class.cancan_resource_class.new(controller, resource_name, options.except(:only, :except)).send(method)
end
end