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] --- guides/source/active_record_validations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') 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 -- cgit v1.2.3