Skip to content

Commit

Permalink
Fix AMo code example indent, add missing author to entry [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed Mar 9, 2013
1 parent 72be5bb commit b3a31e9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions activemodel/CHANGELOG.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@


Example: Example:


# given User has_secure_password. # Given User has_secure_password.
@user.password = "" @user.password = ""
@user.password_confirmation = "" @user.password_confirmation = ""
@user.valid?(:update) # used to be false @user.valid?(:update) # used to be false


*Yves Senn*

* `validates_confirmation_of` does not override writer methods for * `validates_confirmation_of` does not override writer methods for
the confirmation attribute if no reader is defined. the confirmation attribute if no reader is defined.


Example: Example:


class Blog class Blog
def title=(new_title) def title=(new_title)
@title = new_title.downcase @title = new_title.downcase
end end


# previously this would override the setter above. # previously this would override the setter above.
validates_confirmation_of :title validates_confirmation_of :title
end end


*Yves Senn* *Yves Senn*
Expand Down

0 comments on commit b3a31e9

Please sign in to comment.