aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorErnie Miller <ernie@metautonomo.us>2010-05-22 15:31:06 -0400
committerJeremy Kemper <jeremy@bitsweat.net>2010-06-08 01:02:19 -0400
commita4eaa1fd39f93eff975bfd8a5cc4c7dfc3f18aa7 (patch)
treeaa4ec34ceab2d5121e52126fd6a04c7be4505a0c /activerecord/lib/active_record
parente404490f9bae102f8c7126917d59568e6d1fef79 (diff)
downloadrails-a4eaa1fd39f93eff975bfd8a5cc4c7dfc3f18aa7.tar.gz
rails-a4eaa1fd39f93eff975bfd8a5cc4c7dfc3f18aa7.tar.bz2
rails-a4eaa1fd39f93eff975bfd8a5cc4c7dfc3f18aa7.zip
Fix multiple self-referencing eager loads failing to join multiple times
[#4679 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-xactiverecord/lib/active_record/associations.rb4
1 files changed, 2 insertions, 2 deletions
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