开发者

rails, how to validate that an associated record exists before saving?

I have the following mod开发者_运维技巧els:

Groups, and then GroupMembers.

I don't want a group to be allowed to be saved there is at least one groupmember model associated via a build.

how can I do that in the model? Thanks


See rails has_many minimum collection size update validation

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜