From 0b6428391f3fd0073e54336808ad8e03014ab9de Mon Sep 17 00:00:00 2001 From: Dmitry Lihachev Date: Sat, 18 Dec 2010 18:22:12 +0800 Subject: [PATCH] we should not use instance_name when loading parents in shallowed mode --- lib/inherited_resources/shallow_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/inherited_resources/shallow_helpers.rb b/lib/inherited_resources/shallow_helpers.rb index 0602fc35..074ff122 100644 --- a/lib/inherited_resources/shallow_helpers.rb +++ b/lib/inherited_resources/shallow_helpers.rb @@ -75,7 +75,7 @@ def symbols_for_association_chain #:nodoc: def load_parents(instance, parent_symbols) parent_symbols.reverse.each do |parent| - instance = instance.send(resources_configuration[parent][:instance_name]) + instance = instance.send(parent) params[resources_configuration[parent][:param]] = instance.id end end