Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
validates_confirmation_of
does not override writer methods.
- Loading branch information
Showing
3 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
senny
Author
Member
|
||
@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) ## | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Isn't this the wrong indentation?