diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-04-06 19:17:54 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-04-06 19:17:54 -0300 |
commit | d5f80655f9d285cf569ec28e741bbc4bd16e6599 (patch) | |
tree | f235d56f2c0bd97486a0634297fbf7aa1fca8f15 /activerecord/lib | |
parent | 8b88df94ebda2e829782f514ff51caeaf5e694dd (diff) | |
parent | e646d3bf574ad3ea7dc5b525511377559b2640dc (diff) | |
download | rails-d5f80655f9d285cf569ec28e741bbc4bd16e6599.tar.gz rails-d5f80655f9d285cf569ec28e741bbc4bd16e6599.tar.bz2 rails-d5f80655f9d285cf569ec28e741bbc4bd16e6599.zip |
Merge pull request #19647 from codeout/association_update
Fix a regression introduced by removing unnecessary db call when replacing
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_association.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 88531205a1..6caadb4ce8 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -370,6 +370,8 @@ module ActiveRecord replace_common_records_in_memory(other_array, original_target) if other_array != original_target transaction { replace_records(other_array, original_target) } + else + other_array end end end |