Fixed that Active Record objects with float attribute could not be cloned #808

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 065cb2a0
......@@ -1048,7 +1048,7 @@ def attributes
self.attribute_names.inject({}) do |attributes, name|
begin
attributes[name] = read_attribute(name).clone
rescue TypeError
rescue TypeError, NoMethodError
attributes[name] = read_attribute(name)
end
attributes
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册