Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add details on password confirmation used with has_secure_password

  • Loading branch information...
commit d7536e610814beccb251cd89bd0ba909cf3e8ad8 1 parent 7864f83
@danielvlopes danielvlopes authored
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'
Please sign in to comment.
Something went wrong with that request. Please try again.