aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-07-20 15:52:53 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-07-20 15:52:53 -0700
commit22e47279bc5a905b2535b9bbf7061ca72e8d3b71 (patch)
tree12def7f44aa4541bd3627296daf5286f16f9a463 /activerecord/lib/active_record
parent8bc314b3b7dca6d3c796760ace1bb9c1d4cadf53 (diff)
downloadrails-22e47279bc5a905b2535b9bbf7061ca72e8d3b71.tar.gz
rails-22e47279bc5a905b2535b9bbf7061ca72e8d3b71.tar.bz2
rails-22e47279bc5a905b2535b9bbf7061ca72e8d3b71.zip
no need to sort the values
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/nested_attributes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb
index 69a8518ba0..2dbebfcaf8 100644
--- a/activerecord/lib/active_record/nested_attributes.rb
+++ b/activerecord/lib/active_record/nested_attributes.rb
@@ -383,7 +383,7 @@ module ActiveRecord
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