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
精彩评论