When I execute this query:
User.where(:comments.size => 10)
I am getting the following error:
undefined method `size' for :comments:Symbol
But according to the documentation here:
This should be possible. So, why the error?
Note: 'comments' is separate collection from User with a 'has_and_belongs_to_many' relationship.
I am using mongoid 3.0.0 and bson_ext 1.6.1
Thanks in advance!