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/lib/active_record/validations.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/lib/active_record') 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