diff options
Diffstat (limited to 'activerecord/lib/active_record')
-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 |