Permalink
Browse files

no need to sort the values

  • Loading branch information...
1 parent 1d674d5 commit 9a6b96a61a74761ec9fcd6bbf7e895b61029fb93 @tenderlove tenderlove committed Jul 20, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit 9a6b96a

Please sign in to comment.