Rails: How to show items only if creator is unique?
|Added at||2016-12-28 13:12|
I have many users and each user has multiple projects.
Now, I want to get only one item per user.
@projects = Project.all.where(user_id is unique)
That is project should be fetched only if no other project from the same user was fetched already.
Hope I was clear with my question. I am on Rails 5.
I am using postgres in production.