I have a website that has works on the premise:
example.com/user_id/news/slug-for-article
By default, I have enabled unique slugs for articles, however I would like to have slugs unique per user, across all users.
The non-uniqueness is handled by using @user.articles.friendly.find(param)
.
How can I set this up so it ensures uniqueness, but only for a defined attribute?