提交 c51f9fdc 编写于 作者: R Rick Olson

revert ActiveRecord equality change. Closes #5596

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4554 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 7e5dd2e1
......@@ -1646,9 +1646,8 @@ def column_for_attribute(name)
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 ==
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册