aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-01-07 19:12:37 +0000
committerAaron Patterson <aaron.patterson@gmail.com>2011-01-11 13:45:06 -0800
commitc6e10b0f600a56e962ff7d1614c50fca20630379 (patch)
tree790c400d45f2c5316aff05475b295990764e80ce /activerecord/lib/active_record
parent665880c0809b563d3afaeadd073f5d0b6289a42e (diff)
downloadrails-c6e10b0f600a56e962ff7d1614c50fca20630379.tar.gz
rails-c6e10b0f600a56e962ff7d1614c50fca20630379.tar.bz2
rails-c6e10b0f600a56e962ff7d1614c50fca20630379.zip
has_one should always remove the old record (properly), even if not saving the new record, so we don't get the database into a pickle
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/associations/has_one_association.rb2
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 739bb919c5..9135c60009 100644
--- a/activerecord/lib/active_record/associations/has_one_association.rb
+++ b/activerecord/lib/active_record/associations/has_one_association.rb
@@ -20,7 +20,7 @@ module ActiveRecord
load_target
if @target && @target != record
- remove_target(save && @reflection.options[:dependent])
+ remove_target(@reflection.options[:dependent])
end
if record