提交 517b8fb2 编写于 作者: S Sergey Nartimov

Array.wrap is an overhead as there is already check for class

上级 fc956425
......@@ -382,7 +382,7 @@ def assign_nested_attributes_for_collection_association(association_name, attrib
if attributes_collection.is_a? Hash
keys = attributes_collection.keys
attributes_collection = if keys.include?('id') || keys.include?(:id)
Array.wrap(attributes_collection)
[attributes_collection]
else
attributes_collection.values
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册