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.
EDIT:
I am using postgres in production.