From b501ee47fa3f877f8b8028e732f8ef8a22cc75fb Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Mon, 4 Mar 2013 18:50:56 +0100 Subject: `validates_confirmation_of` does not override writer methods. --- activemodel/CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'activemodel/CHANGELOG.md') diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index 1fe6dbd4d9..e518334d5d 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -1,5 +1,20 @@ ## Rails 4.0.0 (unreleased) ## +* `validates_confirmation_of` does not override writer methods for + the confirmation attribute if no reader is defined. + + Example: + + class Blog + def title=(new_title) + @title = new_title.downcase + end + + # previously this would override the setter above. + validates_confirmation_of :title + end + + *Yves Senn* ## Rails 4.0.0.beta1 (February 25, 2013) ## -- cgit v1.2.3