提交 7f671f4a 编写于 作者: M Marcel Molina

Document the :message option for validates_associated. Closes #10357 [dylans]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8281 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 e4d845ef
*SVN* *SVN*
* Document the :message option for validates_associated. Closes #10357 [dylans]
* Document automatically generated predicate methods for attributes. Closes #10373 [chuyeow] * Document automatically generated predicate methods for attributes. Closes #10373 [chuyeow]
* Added ActiveRecord::Base#becomes to turn a record into one of another class (mostly relevant for STIs) [DHH]. Example: * Added ActiveRecord::Base#becomes to turn a record into one of another class (mostly relevant for STIs) [DHH]. Example:
......
...@@ -777,6 +777,7 @@ def validates_exclusion_of(*attr_names) ...@@ -777,6 +777,7 @@ def validates_exclusion_of(*attr_names)
# is both present and guaranteed to be valid, you also need to use validates_presence_of. # is both present and guaranteed to be valid, you also need to use validates_presence_of.
# #
# Configuration options: # Configuration options:
# * <tt>message</tt> - A custom error message (default is: "is invalid")
# * <tt>on</tt> Specifies when this validation is active (default is :save, other options :create, :update) # * <tt>on</tt> Specifies when this validation is active (default is :save, other options :create, :update)
# * <tt>if</tt> - Specifies a method, proc or string to call to determine if the validation should # * <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 # occur (e.g. :if => :allow_validation, or :if => Proc.new { |user| user.signup_step > 2 }). The
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册