From 66e2e19bc03d4dc5f775848ceedb33ada75a7ace Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Fri, 20 Feb 2015 23:53:36 +0900 Subject: use `messages` instead of deprecated `ActiveModel::Errors#[]=` method [ci skip] --- activemodel/README.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel/README.rdoc') 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 -- cgit v1.2.3