From 2ae2728d78298030b1015497840b0519b5ed21a1 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Mon, 15 Jul 2013 11:17:25 -0700 Subject: Merge pull request #11451 from jetthoughts/11450_do_not_resave_destroyed_association Do not re-save destroyed association on saving parent object Conflicts: activerecord/lib/active_record/autosave_association.rb --- activerecord/lib/active_record/autosave_association.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/autosave_association.rb b/activerecord/lib/active_record/autosave_association.rb index 3fc9d307bc..4da39299f0 100644 --- a/activerecord/lib/active_record/autosave_association.rb +++ b/activerecord/lib/active_record/autosave_association.rb @@ -339,6 +339,8 @@ module ActiveRecord end records.each do |record| + next if record.destroyed? + saved = true if autosave != false && (@new_record_before_save || record.new_record?) -- cgit v1.2.3