1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

revert ActiveRecord equality change. Closes #5596

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4554 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Rick Olson 2006-07-05 14:22:24 +00:00
parent 7e5dd2e124
commit c51f9fdc78

View file

@ -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 ==