Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use cancan_resource_class for before filters instead of hardcoded Con…

…trollerResource class
  • Loading branch information...
commit 0b270f2d0f7073ad571bc86ad227bd6f80c4947f 1 parent 961df90
@jbarreneche jbarreneche authored committed
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|
- 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
Please sign in to comment.
Something went wrong with that request. Please try again.