1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

[ci skip] Update #has_secure_password docs

This commit is contained in:
Akshay Vishnoi 2014-06-14 19:18:24 +05:30
parent 34221cdcab
commit fb48fccc25

View file

@ -16,16 +16,19 @@ module ActiveModel
# Adds methods to set and authenticate against a BCrypt password. # Adds methods to set and authenticate against a BCrypt password.
# This mechanism requires you to have a +password_digest+ attribute. # This mechanism requires you to have a +password_digest+ attribute.
# #
# Validations for presence of password on create, confirmation of password # The following validations are added automatically:
# (using a +password_confirmation+ attribute) are automatically added. If # * Password must be present on creation
# you wish to turn off validations, pass <tt>validations: false</tt> as an # * Password length should be less than or equal to 72 characters
# argument. You can add more validations by hand if need be. # * Confirmation of password (using a +password_confirmation+ attribute)
# #
# If you don't need the confirmation validation, just don't set any # If validations are not needed, pass <tt>validations: false</tt> as an
# argument. More validations can be added if required.
#
# If password confirmation validation is not needed, do not set any
# value to the password_confirmation attribute and the validation # value to the password_confirmation attribute and the validation
# will not be triggered. # will not be triggered.
# #
# You need to add bcrypt (~> 3.1.7) to Gemfile to use #has_secure_password: # Add bcrypt (~> 3.1.7) to Gemfile to use #has_secure_password:
# #
# gem 'bcrypt', '~> 3.1.7' # gem 'bcrypt', '~> 3.1.7'
# #