diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rwxr-xr-x | activerecord/lib/active_record/validations.rb | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 0404f2e315..1ed481bd45 100644 --- a/activerecord/CHANGELOG +++ b/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] 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. |