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 /activemodel/README.rdoc | |
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 'activemodel/README.rdoc')
-rw-r--r-- | activemodel/README.rdoc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc index f6beff14e1..0985f56bfb 100644 --- a/activemodel/README.rdoc +++ b/activemodel/README.rdoc @@ -219,7 +219,7 @@ behavior out of the box: class HasNameValidator < ActiveModel::Validator def validate(record) - record.errors[:name] = "must exist" if record.name.blank? + record.errors.messages[:name] << "must exist" if record.name.blank? end end |