Merge branch 'master' of https://github.com/stefanoverna/cancan into stefanoverna-master

This commit is contained in:
Ryan Bates 2011-03-08 15:33:47 -08:00
commit 2c2fa306cc

View File

@ -3,7 +3,8 @@ module CanCan
class InheritedResource < ControllerResource # :nodoc:
def load_resource_instance
if parent?
@controller.send :parent
@controller.send :association_chain
@controller.instance_variable_get("@#{instance_name}")
elsif new_actions.include? @params[:action].to_sym
@controller.send :build_resource
else