aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/exclusion.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-02-21 11:37:08 +0100
committerXavier Noria <fxn@hashref.com>2011-02-21 11:37:08 +0100
commitb481574a33764e2db1caf01c233a9c9ac9723780 (patch)
treeff621c47d30cc38f9d6cfeec2bb9188b5f8b7ebf /activemodel/lib/active_model/validations/exclusion.rb
parent9297027e082c69e590fc090132cee495ce0fc4b1 (diff)
downloadrails-b481574a33764e2db1caf01c233a9c9ac9723780.tar.gz
rails-b481574a33764e2db1caf01c233a9c9ac9723780.tar.bz2
rails-b481574a33764e2db1caf01c233a9c9ac9723780.zip
copy-edits 8d96b89
Diffstat (limited to 'activemodel/lib/active_model/validations/exclusion.rb')
-rw-r--r--activemodel/lib/active_model/validations/exclusion.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/validations/exclusion.rb b/activemodel/lib/active_model/validations/exclusion.rb
index 4138892786..e38e565d09 100644
--- a/activemodel/lib/active_model/validations/exclusion.rb
+++ b/activemodel/lib/active_model/validations/exclusion.rb
@@ -29,6 +29,9 @@ module ActiveModel
# * <tt>:message</tt> - Specifies a custom error message (default is: "is reserved").
# * <tt>:allow_nil</tt> - If set to true, skips this validation if the attribute is +nil+ (default is +false+).
# * <tt>:allow_blank</tt> - If set to true, skips this validation if the attribute is blank (default is +false+).
+ # * <tt>:on</tt> - Specifies when this validation is active. Runs in all
+ # validation contexts by default (+nil+), other options are <tt>:create</tt>
+ # and <tt>:update</tt>.
# * <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 value.