Mongo and Mongoid checking if an array is empty
First attempt in Mongoid:
{ foo: { $not: { $size: 0 } } }
This gets translated to mongoid with the following:
User.where(:foo.size => 0)
:) ENJOY!!

seen from United States
seen from Poland

seen from United States
seen from France

seen from United States

seen from United States

seen from United States

seen from United States
seen from United Kingdom
seen from Argentina
seen from Argentina

seen from Malaysia
seen from United States

seen from Bulgaria

seen from Germany

seen from United States
seen from United States

seen from United States

seen from United States
seen from Kazakhstan
Mongo and Mongoid checking if an array is empty
First attempt in Mongoid:
{ foo: { $not: { $size: 0 } } }
This gets translated to mongoid with the following:
User.where(:foo.size => 0)
:) ENJOY!!