aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/exclusion.rb
diff options
context:
space:
mode:
authorRadan Skoric <radan.skoric@gmail.com>2015-06-14 11:51:08 +0200
committerRadan Skoric <radan.skoric@gmail.com>2015-06-27 16:34:16 +0200
commite5a78aaaf85baf3c522a1bff12897300842c54c5 (patch)
treec8f9f36c02737c7d76289b2b69fc34d4f40a8cf8 /activemodel/lib/active_model/validations/exclusion.rb
parente67386a8c49df4d5973c1d04972db321082aaefe (diff)
downloadrails-e5a78aaaf85baf3c522a1bff12897300842c54c5.tar.gz
rails-e5a78aaaf85baf3c522a1bff12897300842c54c5.tar.bz2
rails-e5a78aaaf85baf3c522a1bff12897300842c54c5.zip
Improve Validation Helpers' documentation comments and tests
Diffstat (limited to 'activemodel/lib/active_model/validations/exclusion.rb')
-rw-r--r--activemodel/lib/active_model/validations/exclusion.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validations/exclusion.rb b/activemodel/lib/active_model/validations/exclusion.rb
index f342d27275..6f4276cc2a 100644
--- a/activemodel/lib/active_model/validations/exclusion.rb
+++ b/activemodel/lib/active_model/validations/exclusion.rb
@@ -29,7 +29,9 @@ module ActiveModel
# Configuration options:
# * <tt>:in</tt> - An enumerable object of items that the value shouldn't
# be part of. This can be supplied as a proc, lambda or symbol which returns an
- # enumerable. If the enumerable is a range the test is performed with
+ # enumerable. If the enumerable is a numerical, time or datetime range the test
+ # is performed with <tt>Range#cover?</tt>, otherwise with <tt>include?</tt>. When
+ # using a proc or lambda the instance under validation is passed as an argument.
# * <tt>:within</tt> - A synonym(or alias) for <tt>:in</tt>
# <tt>Range#cover?</tt>, otherwise with <tt>include?</tt>.
# * <tt>:message</tt> - Specifies a custom error message (default is: "is