diff options
author | Philip Arndt <parndt@gmail.com> | 2012-07-26 11:44:38 +1200 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2012-07-26 11:44:38 +1200 |
commit | a0b85b9ada9c5afbe891f290e9f2effbcb79aeab (patch) | |
tree | 1dd95380f12881347ac5c6da4fc6e3362aefda91 /activerecord/lib/active_record/persistence.rb | |
parent | f27a8eb71a14a9e12e26f182a3694a44abe81ee5 (diff) | |
download | rails-a0b85b9ada9c5afbe891f290e9f2effbcb79aeab.tar.gz rails-a0b85b9ada9c5afbe891f290e9f2effbcb79aeab.tar.bz2 rails-a0b85b9ada9c5afbe891f290e9f2effbcb79aeab.zip |
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.
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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) |