Hello everyone
Just to be sure, what is the easiest way to validate that a combination of 2 fields is unique in my model ?
Example :
I have Posts and Comments
A posts can have multiple comments (so post_id is not unique) and multiple comments can have the same title (title is not unique either).
But, I don't want 2 comments from the same post to have the same title. How is the easiest way to test that in my Comment model ?