-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
Using mongoid (3.0.23)
I have this on my User model:
field :items, type: Array, :default => []
I am trying to find users with items.length > 1:
User.where(:items.with_size => {:'$gt' => 1}).desc(:'items.length').limit(10)
This doesn't seem to work. I get results as if the condition is ignored altogether.