AnApprentice
AnApprentice

Reputation: 110970

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

I have the following models:

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

Upvotes: 0

Views: 527

Answers (1)

Related Questions