diff options
Diffstat (limited to 'activemodel/lib/active_model/validations/confirmation.rb')
-rw-r--r-- | activemodel/lib/active_model/validations/confirmation.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/activemodel/lib/active_model/validations/confirmation.rb b/activemodel/lib/active_model/validations/confirmation.rb index 3a80893866..a31966d0c2 100644 --- a/activemodel/lib/active_model/validations/confirmation.rb +++ b/activemodel/lib/active_model/validations/confirmation.rb @@ -15,13 +15,13 @@ module ActiveModel end module HelperMethods - # Encapsulates the pattern of wanting to validate a password or email + # Encapsulates the pattern of wanting to validate a password or email # address field with a confirmation. For example: # # Model: # class Person < ActiveRecord::Base # validates_confirmation_of :user_name, :password - # validates_confirmation_of :email_address, + # validates_confirmation_of :email_address, # :message => "should match confirmation" # end # @@ -29,12 +29,12 @@ module ActiveModel # <%= password_field "person", "password" %> # <%= password_field "person", "password_confirmation" %> # - # The added +password_confirmation+ attribute is virtual; it exists only + # The added +password_confirmation+ attribute is virtual; it exists only # as an in-memory attribute for validating the password. To achieve this, - # the validation adds accessors to the model for the confirmation + # the validation adds accessors to the model for the confirmation # attribute. - # - # NOTE: This check is performed only if +password_confirmation+ is not + # + # NOTE: This check is performed only if +password_confirmation+ is not # +nil+, and by default only on save. To require confirmation, make sure # to add a presence check for the confirmation attribute: # @@ -48,11 +48,11 @@ module ActiveModel # * <tt>:if</tt> - Specifies a method, proc or string to call to determine # if the validation should occur (e.g. <tt>:if => :allow_validation</tt>, # or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The - # method, proc or string should return or evaluate to a true or false + # method, proc or string should return or evaluate to a true or false # value. - # * <tt>:unless</tt> - Specifies a method, proc or string to call to - # determine if the validation should not occur (e.g. - # <tt>:unless => :skip_validation</tt>, or + # * <tt>:unless</tt> - Specifies a method, proc or string to call to + # determine if the validation should not occur (e.g. + # <tt>:unless => :skip_validation</tt>, or # <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The # method, proc or string should return or evaluate to a true or false value. def validates_confirmation_of(*attr_names) |