aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-01-05 20:17:37 +0000
committerRick Olson <technoweenie@gmail.com>2007-01-05 20:17:37 +0000
commit606376bd448a5d27cbcd5d23ad89a99d9d4fdb54 (patch)
tree26b3ced34a861f36c5ccd8816a2ce6446ae3fbe4 /activerecord/lib/active_record
parentf1b45df49ac392378502ba7994fb079fac473d03 (diff)
downloadrails-606376bd448a5d27cbcd5d23ad89a99d9d4fdb54.tar.gz
rails-606376bd448a5d27cbcd5d23ad89a99d9d4fdb54.tar.bz2
rails-606376bd448a5d27cbcd5d23ad89a99d9d4fdb54.zip
[DOCS] Document :allow_nil option of #validate_uniqueness_of. Closes #3143 [Caio Chassot]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5853 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-xactiverecord/lib/active_record/validations.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb
index 342a4844cc..6f284242cd 100755
--- a/activerecord/lib/active_record/validations.rb
+++ b/activerecord/lib/active_record/validations.rb
@@ -520,6 +520,7 @@ module ActiveRecord
# * <tt>message</tt> - Specifies a custom error message (default is: "has already been taken")
# * <tt>scope</tt> - One or more columns by which to limit the scope of the uniquness constraint.
# * <tt>case_sensitive</tt> - Looks for an exact match. Ignored by non-text columns (true by default).
+ # * <tt>allow_nil</tt> - If set to true, skips this validation if the attribute is null (default is: false)
# * <tt>if</tt> - Specifies a method, proc or string to call to determine if the validation should
# occur (e.g. :if => :allow_validation, or :if => Proc.new { |user| user.signup_step > 2 }). The
# method, proc or string should return or evaluate to a true or false value.