Using Mongoid. Unfortunately, Mongoid does not allow for selecting unique / distinct!
Have gotten these results. As you can see, there are 7 results. If you look carefully (at
For those hitting this up in the future, you can now use the Mongoid::Criteria#distinct method from Origin to select only distinct values from the database:
# Requires a Mongoid::Criteria
Attendees.all.distinct(:user_id)