allow :through option to work with private controller methods - closes #360
This commit is contained in:
parent
cb9777be5f
commit
dde88c92b7
|
@ -178,7 +178,7 @@ module CanCan
|
|||
def fetch_parent(name)
|
||||
if @controller.instance_variable_defined? "@#{name}"
|
||||
@controller.instance_variable_get("@#{name}")
|
||||
elsif @controller.respond_to? name
|
||||
elsif @controller.respond_to?(name, true)
|
||||
@controller.send(name)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user