Closed simlegate closed 11 years ago
You can see that length calls .count
method without passing any argument, https://github.com/mongoid/mongoid/blob/3.1.0-stable/lib/mongoid/contextual/mongo.rb#L291, this means that limit wont be used on your count query, when you wanna use limit in your count you must call .count(true)
.
why not 1 ?