diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-07-20 15:52:53 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-07-20 15:52:53 -0700 |
commit | 22e47279bc5a905b2535b9bbf7061ca72e8d3b71 (patch) | |
tree | 12def7f44aa4541bd3627296daf5286f16f9a463 | |
parent | 8bc314b3b7dca6d3c796760ace1bb9c1d4cadf53 (diff) | |
download | rails-22e47279bc5a905b2535b9bbf7061ca72e8d3b71.tar.gz rails-22e47279bc5a905b2535b9bbf7061ca72e8d3b71.tar.bz2 rails-22e47279bc5a905b2535b9bbf7061ca72e8d3b71.zip |
no need to sort the values
-rw-r--r-- | activerecord/lib/active_record/nested_attributes.rb | 2 |
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 |