diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-02-20 23:53:36 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-02-20 23:53:36 +0900 |
commit | 66e2e19bc03d4dc5f775848ceedb33ada75a7ace (patch) | |
tree | d2c6abc194e4fbbc03cf1b8ca023f18e681bbe5b /guides/source | |
parent | 9a476b8cd6724699027eb00ec7ffa8b232d1b734 (diff) | |
download | rails-66e2e19bc03d4dc5f775848ceedb33ada75a7ace.tar.gz rails-66e2e19bc03d4dc5f775848ceedb33ada75a7ace.tar.bz2 rails-66e2e19bc03d4dc5f775848ceedb33ada75a7ace.zip |
use `messages` instead of deprecated `ActiveModel::Errors#[]=` method [ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/active_record_validations.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index de26a9bd6d..31c5b07a05 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[:name] = "cannot contain the characters !@#%*()_-+=" + errors.messages[:name] << "cannot contain the characters !@#%*()_-+=" end end |