Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fetch cancan_resource_class through controller class from ControllerR…

…esource
  • Loading branch information...
commit cef55c95e7f9659475c8d6f2e3043ba096808572 1 parent 7e0e722
@ryanb authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/cancan/controller_resource.rb
View
2  lib/cancan/controller_resource.rb
@@ -6,7 +6,7 @@ def self.add_before_filter(controller_class, method, *args)
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
Please sign in to comment.
Something went wrong with that request. Please try again.