根据rails指南,我对validates_associated的理解是,它应该确保在保存之前关联的记录是有效的。forum_post.errors.should be_empty #empty because reply was not expected to be validated
考虑到我没有在ForumPost模型中指定validates_associated那么,如果模型的行为方式没有指定validates_associated,那么validates_associated会做什么呢?
我有一个名为Sub_Router的表,下面的示例数据只有两列select s1.Associated_Router_L2 where s1.Associated_Router_L1 in (select s2.Associated_Router_L2s2 on s1.Associated_Router_L1 = s2.Associated