提交 7372e9ae 编写于 作者: V Vijay Dev 提交者: Xavier Noria

make the warning clear about the effect of using validates_associated on both...

make the warning clear about the effect of using validates_associated on both sides on an association.
上级 ad55b1aa
......@@ -17,15 +17,7 @@ module ClassMethods
# validates_associated :pages, :library
# end
#
# Warning: If, after the above definition, you then wrote:
#
# class Page < ActiveRecord::Base
# belongs_to :book
#
# validates_associated :book
# end
#
# this would specify a circular dependency and cause infinite recursion.
# WARNING: This validation must not be used on both ends of an association. Doing so will lead to a circular dependency and cause infinite recursion.
#
# NOTE: This validation will not fail if the association hasn't been assigned. If you want to
# ensure that the association is both present and guaranteed to be valid, you also need to
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册