aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-06-30 11:54:22 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-06-30 15:31:22 -0700
commit8e19a5dc4c9d69adc69f52f1377c174a8d5bf751 (patch)
treee7856297ae90128a6bd31839be04a51ad305d2a4 /activerecord
parent2545da6dd69067d911bbd19a7660e38dca4779dd (diff)
downloadrails-8e19a5dc4c9d69adc69f52f1377c174a8d5bf751.tar.gz
rails-8e19a5dc4c9d69adc69f52f1377c174a8d5bf751.tar.bz2
rails-8e19a5dc4c9d69adc69f52f1377c174a8d5bf751.zip
call super rather than delegating to the other objects equal? method
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 57b6e64a73..c2383630e0 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1784,7 +1784,7 @@ MSG
# Note also that destroying a record preserves its ID in the model instance, so deleted
# models are still comparable.
def ==(comparison_object)
- comparison_object.equal?(self) ||
+ super ||
comparison_object.instance_of?(self.class) &&
id.present? &&
comparison_object.id == id