diff options
-rw-r--r-- | activerecord/CHANGELOG.md | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index f4a573bb72..aa2b9685d0 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -11,7 +11,7 @@ *Rafael Mendonça França* -* Change update_attribute deprecation warning suggesting to use update_columns instead of update_column. *Philip Arndt* +* Change the deprecation warning of `update_attribute` suggesting to use `update_attributes` or `update_columns` instead of `update_column`. *Philip Arndt & Xavier Noria* * update_columns added. *Sebastián Martínez* diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index c9e3fc5b05..3926d6ee10 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.1. Please use update_attributes or update_columns instead. Check their documentation for the implications.") raise ActiveRecordError, "#{name} is marked as readonly" if self.class.readonly_attributes.include?(name) send("#{name}=", value) save(:validate => false) |