iyanski
3/30/2012 - 4:46 PM

Counting results when specifying limit() in mongoid initially did not work

Counting results when specifying limit() in mongoid initially did not work

1.9.2p290 :022 > Photo.all.count
 => 21 
1.9.2p290 :023 > Photo.where(orientation: 'portrait').limit(2).count
 => 9