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:
parent
7e5dd2e124
commit
c51f9fdc78
1 changed files with 2 additions and 3 deletions
|
@ -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 ==
|
||||
|
|
Loading…
Reference in a new issue