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:
commit
6708e8438c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue