Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Commit

Permalink
allow :through option to work with private controller methods - closes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanb committed May 17, 2011
1 parent cb9777b commit dde88c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cancan/controller_resource.rb
Expand Up @@ -178,7 +178,7 @@ def parent_resource
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
Expand Down

0 comments on commit dde88c9

Please sign in to comment.