aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-07-05 14:22:24 +0000
committerRick Olson <technoweenie@gmail.com>2006-07-05 14:22:24 +0000
commitc51f9fdc78d1732d6c08a6411ca9d2536aa86d6e (patch)
treee69487e00c301d47a37f33e854bb81b0a59a4524 /activerecord
parent7e5dd2e1245b55a8630ddd70a729f5a7b89d18e0 (diff)
downloadrails-c51f9fdc78d1732d6c08a6411ca9d2536aa86d6e.tar.gz
rails-c51f9fdc78d1732d6c08a6411ca9d2536aa86d6e.tar.bz2
rails-c51f9fdc78d1732d6c08a6411ca9d2536aa86d6e.zip
revert ActiveRecord equality change. Closes #5596
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4554 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rwxr-xr-xactiverecord/lib/active_record/base.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index fba17bd917..812f30c773 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1646,9 +1646,8 @@ module ActiveRecord #:nodoc:
def ==(comparison_object)
comparison_object.equal?(self) ||
(comparison_object.instance_of?(self.class) &&
- ((!comparison_object.new_record? && comparison_object.id == id) ||
- (comparison_object.new_record? && comparison_object.attributes == attributes))
- )
+ comparison_object.id == id &&
+ !comparison_object.new_record?)
end
# Delegates to ==