Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

no need to sort the values

  • Loading branch information...
commit 9a6b96a61a74761ec9fcd6bbf7e895b61029fb93 1 parent 1d674d5
@tenderlove tenderlove authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/nested_attributes.rb
View
2  activerecord/lib/active_record/nested_attributes.rb
@@ -383,7 +383,7 @@ def assign_nested_attributes_for_collection_association(association_name, attrib
attributes_collection = if keys.include?('id') || keys.include?(:id)
Array.wrap(attributes_collection)
else
- attributes_collection.sort_by { |i, _| i.respond_to?(:to_i) ? i.to_i : i.object_id }.map { |_, attributes| attributes }
+ attributes_collection.values
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.