Use cancan_resource_class for before filters instead of hardcoded ControllerResource class
This commit is contained in:
parent
961df90ecd
commit
0b270f2d0f
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user