aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-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