Say i have a collection of answers where each answer contains an array of user_ids.
- answer has_and_belongs_to_many: users
Is it possible to have a query that sorts by the number of user_ids?
Answer.all.desc(num_user_ids)
i can cache this number, but i am hoping i do not have to. i am using mongoid