diff options
author | Paul Nikitochkin <paul.nikitochkin@gmail.com> | 2013-07-15 14:07:33 +0300 |
---|---|---|
committer | Paul Nikitochkin <paul.nikitochkin@gmail.com> | 2013-07-15 20:39:30 +0300 |
commit | 372e809667b37f11e232a762815211601859b8b5 (patch) | |
tree | 427dbffdd3f1dcbe1e1a191d27246727abfeadc7 /activerecord/lib/active_record | |
parent | 0b61cc730ee1fd2b40acac5886a62ea91c0b3d51 (diff) | |
download | rails-372e809667b37f11e232a762815211601859b8b5.tar.gz rails-372e809667b37f11e232a762815211601859b8b5.tar.bz2 rails-372e809667b37f11e232a762815211601859b8b5.zip |
Do not re-save destroyed association on saving parent object
Closes #11450
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/autosave_association.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/autosave_association.rb b/activerecord/lib/active_record/autosave_association.rb index a8a1847554..c991c870ed 100644 --- a/activerecord/lib/active_record/autosave_association.rb +++ b/activerecord/lib/active_record/autosave_association.rb @@ -343,6 +343,7 @@ module ActiveRecord end records.each do |record| + next if record.destroyed? saved = true |