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
Have you looked at this page?
http://www.mongodb.org/display/DOCS/Aggregation#Aggregation-Distinct
That might save you some time?
eg db.addresses.distinct("zip-code");