From a0b85b9ada9c5afbe891f290e9f2effbcb79aeab Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Thu, 26 Jul 2012 11:44:38 +1200 Subject: Suggest using update_columns instead of update_column. update_column is deprecated in Rails 4.0 so it makes no sense to recommend adopting it only to require changing to update_columns in the very next release. --- activerecord/lib/active_record/persistence.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index f89b6b68d7..d4c9e4f6cf 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -179,7 +179,7 @@ module ActiveRecord # def update_attribute(name, value) name = name.to_s - ActiveSupport::Deprecation.warn("update_attribute is deprecated and will be removed in Rails 4. If you want to skip mass-assignment protection, callbacks, and modifying updated_at, use update_column. If you do want those things, use update_attributes.") + ActiveSupport::Deprecation.warn("update_attribute is deprecated and will be removed in Rails 4. If you want to skip mass-assignment protection, callbacks, and modifying updated_at, use update_columns. If you do want those things, use update_attributes.") raise ActiveRecordError, "#{name} is marked as readonly" if self.class.readonly_attributes.include?(name) send("#{name}=", value) save(:validate => false) -- cgit v1.2.3