1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

Merge pull request #484 from camallen/count_fix

use the mongoid criteria #length method to cache the count of the collection per criteria
This commit is contained in:
Yuki Nishijima 2013-12-07 08:39:14 -08:00
commit e2df2efa6b

View file

@ -9,7 +9,7 @@ module Kaminari
end
def total_count #:nodoc:
embedded? ? unpage.count : count
embedded? ? unpage.length : length
end
private