aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_validations.md
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-20 20:57:56 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-20 20:58:58 -0200
commitf55bfe726045594c78438841cdccd5843522deab (patch)
tree30bb111448809e786724bf3397a2c72af3ad9fda /guides/source/active_record_validations.md
parent08d9c7532c7081d6b5964b8edf802fab72224cd7 (diff)
downloadrails-f55bfe726045594c78438841cdccd5843522deab.tar.gz
rails-f55bfe726045594c78438841cdccd5843522deab.tar.bz2
rails-f55bfe726045594c78438841cdccd5843522deab.zip
Change the deprecation messages to show the preferred way to work with
ActiveModel::Errors
Diffstat (limited to 'guides/source/active_record_validations.md')
-rw-r--r--guides/source/active_record_validations.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md
index 31c5b07a05..cd7d349c82 100644
--- a/guides/source/active_record_validations.md
+++ b/guides/source/active_record_validations.md
@@ -1078,7 +1078,7 @@ Another way to do this is using `[]=` setter
```ruby
class Person < ActiveRecord::Base
def a_method_used_for_validation_purposes
- errors.messages[:name] << "cannot contain the characters !@#%*()_-+="
+ errors.messages.add(:name, "cannot contain the characters !@#%*()_-+=")
end
end