aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-06-22 15:33:27 +0200
committerYves Senn <yves.senn@gmail.com>2015-06-22 15:45:09 +0200
commit792de3f1ed5358056f75821d39b73ceda272fb03 (patch)
treee4272bed45233b0c852f593b6dc57efc53c534a2 /activerecord/lib
parent30c9aa7883b5363ce3f50aa010a4245a418bca29 (diff)
downloadrails-792de3f1ed5358056f75821d39b73ceda272fb03.tar.gz
rails-792de3f1ed5358056f75821d39b73ceda272fb03.tar.bz2
rails-792de3f1ed5358056f75821d39b73ceda272fb03.zip
docs, update Active Model reference for AR length validator. [ci skip]
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/validations/length.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/validations/length.rb b/activerecord/lib/active_record/validations/length.rb
index 5991fbad8e..ebb1034da7 100644
--- a/activerecord/lib/active_record/validations/length.rb
+++ b/activerecord/lib/active_record/validations/length.rb
@@ -22,7 +22,10 @@ module ActiveRecord
end
module ClassMethods
- # See <tt>ActiveModel::Validation::LengthValidator</tt> for more information.
+ # Validates that the specified attributes matches the length restrictions supplied.
+ # If the attribute is an association, records that are marked for destruction are not counted.
+ #
+ # See ActiveModel::Validations::HelperMethods.validates_length_of for more information.
def validates_length_of(*attr_names)
validates_with LengthValidator, _merge_attributes(attr_names)
end