i tried something like this in rails with mongoid 3.1.0 and lastest 3.1.3. .limit does not work. below it should return 1 row but it returns all (4)
code:
As suggested in the official Mongoid answer, we should be using Gallery.limit(1).count(true)
Gallery.limit(1).count(true)