diff options
author | Marcel Molina <marcel@vernix.org> | 2007-05-06 05:16:41 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2007-05-06 05:16:41 +0000 |
commit | ca3e89d4de727ca43b9c6cd7049364c35649aabd (patch) | |
tree | 011e98f3c7817db101e3ada597479d987db3d81d | |
parent | 6ad9d1dbde26baf6870b87d23381c601fcdee977 (diff) | |
download | rails-ca3e89d4de727ca43b9c6cd7049364c35649aabd.tar.gz rails-ca3e89d4de727ca43b9c6cd7049364c35649aabd.tar.bz2 rails-ca3e89d4de727ca43b9c6cd7049364c35649aabd.zip |
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
-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 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: # * <tt>message</tt> - A custom error message (default is: "must be accepted") # * <tt>on</tt> - Specifies when this validation is active (default is :save, other options :create, :update) + # * <tt>allow_nil</tt> - Skip validation if attribute is nil. (default is true) # * <tt>accept</tt> - Specifies value that is considered accepted. The default value is a string "1", which # makes it easy to relate to an HTML checkbox. # * <tt>if</tt> - Specifies a method, proc or string to call to determine if the validation should |