Permalink
Browse files

add details on password confirmation used with has_secure_password

  • Loading branch information...
1 parent 7864f83 commit d7536e610814beccb251cd89bd0ba909cf3e8ad8 @danielvlopes danielvlopes committed Nov 13, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 activemodel/lib/active_model/secure_password.rb
View
4 activemodel/lib/active_model/secure_password.rb
@@ -11,6 +11,10 @@ module ClassMethods
# you wish to turn off validations, pass <tt>validations: false</tt> as an
# argument. You can add more validations by hand if need be.
#
+ # If you don't need the confirmation validation, just don't set any
+ # value to the password_confirmation attribute and the the validation
+ # will not be triggered.
+ #
# You need to add bcrypt-ruby (~> 3.0.0) to Gemfile to use #has_secure_password:
#
# gem 'bcrypt-ruby', '~> 3.0.0'

0 comments on commit d7536e6

Please sign in to comment.