aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-15 11:28:22 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-15 11:58:41 -0300
commit8055cd65688d5aee9bf756c8483f2c30f75d06cc (patch)
treec7956934bb7672074e6a06c6f0611530ee5507df /activerecord/lib/active_record/associations
parent786713a3abc375fab4d5c2f6f62a878c2ab51022 (diff)
downloadrails-8055cd65688d5aee9bf756c8483f2c30f75d06cc.tar.gz
rails-8055cd65688d5aee9bf756c8483f2c30f75d06cc.tar.bz2
rails-8055cd65688d5aee9bf756c8483f2c30f75d06cc.zip
Do not use update_column where update_attribute is not interchangeable
Revert "Deprecate update_attribute." This reverts commit b081f6b59fb3f15d12043072ad9b331ffd2bc56e. Reason: Since the new deprecation policy we removed the deprecation of update_attribute but we didn't reverted the changes to use update_column. Fixes #7306
Diffstat (limited to 'activerecord/lib/active_record/associations')
-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 08f66eed3f..501ebe7c5b 100644
--- a/activerecord/lib/active_record/associations/has_one_association.rb
+++ b/activerecord/lib/active_record/associations/has_one_association.rb
@@ -38,7 +38,7 @@ module ActiveRecord
when :destroy
target.destroy
when :nullify
- target.update_column(reflection.foreign_key, nil)
+ target.update_attribute(reflection.foreign_key, nil)
end
end
end