From 9bb8ef9edebf5c27b8a1c67ca3776d52afbc1dc4 Mon Sep 17 00:00:00 2001 From: Rich Bradley Date: Sat, 8 Aug 2009 23:29:38 -0700 Subject: Fix for nested :include with namespaced models. [#260 state:committed] --- activerecord/lib/active_record/associations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 66aa9332c8..cce7777039 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1912,7 +1912,7 @@ module ActiveRecord descendant end.flatten.compact - remove_duplicate_results!(reflection.class_name.constantize, parent_records, associations[name]) unless parent_records.empty? + remove_duplicate_results!(reflection.klass, parent_records, associations[name]) unless parent_records.empty? end end end -- cgit v1.2.3