From f55bfe726045594c78438841cdccd5843522deab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 20 Feb 2015 20:57:56 -0200 Subject: Change the deprecation messages to show the preferred way to work with ActiveModel::Errors --- guides/source/active_record_validations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/active_record_validations.md') 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 -- cgit v1.2.3