提交 ca3e89d4 编写于 作者: M Marcel Molina

Document :allow_nil option for validates_acceptance_of since it defaults to...

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
上级 6ad9d1db
*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]
......
......@@ -414,6 +414,7 @@ def validates_confirmation_of(*attr_names)
# 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册