diff options
author | Eileen M. Uchitelle <eileencodes@gmail.com> | 2014-06-14 10:18:02 -0400 |
---|---|---|
committer | Eileen M. Uchitelle <eileencodes@gmail.com> | 2014-06-14 10:18:02 -0400 |
commit | b31a576a5e1632fdca16c857b965c2d196444e25 (patch) | |
tree | f018aa5ec4476ae4913ebb747c21625d2dcdf04d | |
parent | 34221cdcab7d145d22029174a990b3971616cc80 (diff) | |
parent | fb48fccc258dfb64015c98a212eee874e2d6ba7a (diff) | |
download | rails-b31a576a5e1632fdca16c857b965c2d196444e25.tar.gz rails-b31a576a5e1632fdca16c857b965c2d196444e25.tar.bz2 rails-b31a576a5e1632fdca16c857b965c2d196444e25.zip |
Merge pull request #15724 from akshay-vishnoi/secure_password_docs
[ci skip] Update #has_secure_password docs
-rw-r--r-- | activemodel/lib/active_model/secure_password.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb index 879db59b34..a891d1b0c9 100644 --- a/activemodel/lib/active_model/secure_password.rb +++ b/activemodel/lib/active_model/secure_password.rb @@ -16,16 +16,19 @@ module ActiveModel # Adds methods to set and authenticate against a BCrypt password. # This mechanism requires you to have a +password_digest+ attribute. # - # Validations for presence of password on create, confirmation of password - # (using a +password_confirmation+ attribute) are automatically added. If - # you wish to turn off validations, pass <tt>validations: false</tt> as an - # argument. You can add more validations by hand if need be. + # The following validations are added automatically: + # * Password must be present on creation + # * Password length should be less than or equal to 72 characters + # * 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 # 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' # |