From 5b983f6f6b92846a0f96757b0dc9e99e3d980df0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 9 Dec 2004 15:06:24 +0000 Subject: Fixed Base.errors to be indifferent as to whether strings or symbols are used. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@98 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/CHANGELOG | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'activerecord/CHANGELOG') diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 6299d386f4..3a8c81453a 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,17 @@ *CVS* +* Fixed Base.errors to be indifferent as to whether strings or symbols are used. Examples: + + Before: + errors.add(:name, "must be shorter") if name.size > 10 + errors.on(:name) # => "must be shorter" + errors.on("name") # => nil + + After: + errors.add(:name, "must be shorter") if name.size > 10 + errors.on(:name) # => "must be shorter" + errors.on("name") # => "must be shorter" + * Added Base.validate_confirmation that encapsulates the pattern of wanting to validate a password or email address field with a confirmation. Example: Model: -- cgit v1.2.3