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

Merge pull request #4349 from lest/change-array-wrap-2

Array.wrap is an overhead as there is already check for class
This commit is contained in:
Jeremy Kemper 2012-01-06 12:48:13 -08:00
commit 6708e8438c

View file

@ -382,7 +382,7 @@ module ActiveRecord
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