aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/secure_password.rb
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-06-14 11:05:39 -0700
committerGodfrey Chan <godfreykfc@gmail.com>2014-06-14 11:05:39 -0700
commit0ab163d9c61318d3299e4c7bcc326fa75e93226f (patch)
tree8113b3c6da4ad6e82ca2d8a974bdbd749c83fc93 /activemodel/lib/active_model/secure_password.rb
parent69807afdd0e39025230c7c74b09db01f0cc160d6 (diff)
downloadrails-0ab163d9c61318d3299e4c7bcc326fa75e93226f.tar.gz
rails-0ab163d9c61318d3299e4c7bcc326fa75e93226f.tar.bz2
rails-0ab163d9c61318d3299e4c7bcc326fa75e93226f.zip
Edit pass on `has_secure_password` documentation [ci skip]
Diffstat (limited to 'activemodel/lib/active_model/secure_password.rb')
-rw-r--r--activemodel/lib/active_model/secure_password.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb
index a891d1b0c9..fdfd8cb147 100644
--- a/activemodel/lib/active_model/secure_password.rb
+++ b/activemodel/lib/active_model/secure_password.rb
@@ -21,12 +21,13 @@ module ActiveModel
# * Password length should be less than or equal to 72 characters
# * Confirmation of password (using a +password_confirmation+ attribute)
#
- # 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, simply leave out the
+ # value for +password_confirmation+ (i.e. don't provide a form field for
+ # it). When this attribute has a +nil+ value, the validation will not be
+ # triggered.
#
- # If password confirmation validation is not needed, do not set any
- # value to the password_confirmation attribute and the validation
- # will not be triggered.
+ # For further customizability, it is possible to supress the default
+ # validations by passing <tt>validations: false</tt> as an argument.
#
# Add bcrypt (~> 3.1.7) to Gemfile to use #has_secure_password:
#