From ca3e89d4de727ca43b9c6cd7049364c35649aabd Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Sun, 6 May 2007 05:16:41 +0000 Subject: Document :allow_nil option for validates_acceptance_of since it defaults to true. Closes #8050. [tzaharia] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6687 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/CHANGELOG | 2 ++ activerecord/lib/active_record/validations.rb | 1 + 2 files changed, 3 insertions(+) (limited to 'activerecord') diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 55d2212a8a..d0875adce0 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Document :allow_nil option for validates_acceptance_of since it defaults to true. [tzaharia] + * Update documentation for :dependent declaration so that it explicitly uses the non-deprecated API. [danger] * Add documentation caveat about when to use count_by_sql. [fearoffish] diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 296b486023..4362e08f3a 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -414,6 +414,7 @@ module ActiveRecord # Configuration options: # * message - A custom error message (default is: "must be accepted") # * on - Specifies when this validation is active (default is :save, other options :create, :update) + # * allow_nil - Skip validation if attribute is nil. (default is true) # * accept - Specifies value that is considered accepted. The default value is a string "1", which # makes it easy to relate to an HTML checkbox. # * if - Specifies a method, proc or string to call to determine if the validation should -- cgit v1.2.3