From a4eaa1fd39f93eff975bfd8a5cc4c7dfc3f18aa7 Mon Sep 17 00:00:00 2001 From: Ernie Miller Date: Sat, 22 May 2010 15:31:06 -0400 Subject: Fix multiple self-referencing eager loads failing to join multiple times [#4679 state:committed] Signed-off-by: Jeremy Kemper --- activerecord/lib/active_record/associations.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 95d76ae456..c1e16d08cb 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1903,7 +1903,7 @@ module ActiveRecord end def ==(other) - other.is_a?(JoinBase) && + other.class == self.class && other.active_record == active_record && other.table_joins == table_joins end @@ -1974,7 +1974,7 @@ module ActiveRecord end def ==(other) - other.is_a?(JoinAssociation) && + other.class == self.class && other.reflection == reflection && other.parent == parent end -- cgit v1.2.3