diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2011-05-11 14:22:22 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2011-05-11 14:22:22 +0100 |
commit | 0fde84c0f8c0db40110c27890525221751015e6d (patch) | |
tree | e1d5c5090118bf832a20750ad8226ec483fe5f58 /activerecord/lib/active_record | |
parent | b3f45195aa8a35277c3f998917312797936a1f4e (diff) | |
download | rails-0fde84c0f8c0db40110c27890525221751015e6d.tar.gz rails-0fde84c0f8c0db40110c27890525221751015e6d.tar.bz2 rails-0fde84c0f8c0db40110c27890525221751015e6d.zip |
Don't remove the target if it has already been destroyed
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/has_one_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_one_association.rb b/activerecord/lib/active_record/associations/has_one_association.rb index 7134dc85c8..2f3a6e71f1 100644 --- a/activerecord/lib/active_record/associations/has_one_association.rb +++ b/activerecord/lib/active_record/associations/has_one_association.rb @@ -10,7 +10,7 @@ module ActiveRecord reflection.klass.transaction do if target && target != record - remove_target!(options[:dependent]) + remove_target!(options[:dependent]) unless target.destroyed? end if record |