Skip to content

Commit

Permalink
[DOCS] Document :allow_nil option of #validate_uniqueness_of. Closes #…
Browse files Browse the repository at this point in the history
…3143 [Caio Chassot]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5853 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
technoweenie committed Jan 5, 2007
1 parent f1b45df commit 606376b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions activerecord/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*

* [DOCS] Document :allow_nil option of #validate_uniqueness_of. Closes #3143 [Caio Chassot]

* Bring the sybase adapter up to scratch for 1.2 release. [jsheets]

* Rollback #new_record? and #id values for created records that rollback in an after_save callback. Closes #6910 [Ben Curren]
Expand Down
1 change: 1 addition & 0 deletions activerecord/lib/active_record/validations.rb
Expand Up @@ -520,6 +520,7 @@ def validates_length_of(*attrs)
# * <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.
Expand Down

0 comments on commit 606376b

Please sign in to comment.