diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-14 02:13:00 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-14 04:12:33 -0300 |
commit | b451de0d6de4df6bc66b274cec73b919f823d5ae (patch) | |
tree | f252c4143a0adb3be7d36d543282539cca0fb971 /activemodel/lib/active_model/validations/validates.rb | |
parent | 1590377886820e00b1a786616518a32f3b61ec0f (diff) | |
download | rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.tar.gz rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.tar.bz2 rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.zip |
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
Diffstat (limited to 'activemodel/lib/active_model/validations/validates.rb')
-rw-r--r-- | activemodel/lib/active_model/validations/validates.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activemodel/lib/active_model/validations/validates.rb b/activemodel/lib/active_model/validations/validates.rb index 3260e6bc5a..3242e49269 100644 --- a/activemodel/lib/active_model/validations/validates.rb +++ b/activemodel/lib/active_model/validations/validates.rb @@ -9,7 +9,7 @@ module ActiveModel # validator classes ending in 'Validator'. Note that Rails default # validators can be overridden inside specific classes by creating # custom validator classes in their place such as PresenceValidator. - # + # # Examples of using the default rails validators: # # validates :terms, :acceptance => true @@ -21,7 +21,7 @@ module ActiveModel # validates :age, :numericality => true # validates :username, :presence => true # validates :username, :uniqueness => true - # + # # The power of the +validates+ method comes when using custom validators # and default validators in one call for a given attribute e.g. # @@ -31,15 +31,15 @@ module ActiveModel # value =~ /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i # end # end - # + # # class Person # include ActiveModel::Validations # attr_accessor :name, :email - # + # # validates :name, :presence => true, :uniqueness => true, :length => { :maximum => 100 } # validates :email, :presence => true, :email => true # end - # + # # Validator classes may also exist within the class being validated # allowing custom modules of validators to be included as needed e.g. # |