iyanski
3/30/2012 - 4:49 PM

Counting results when specifying limit() in mongoid now works

Counting results when specifying limit() in mongoid now works

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