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:
commit
e2df2efa6b
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ module Kaminari
|
|||
end
|
||||
|
||||
def total_count #:nodoc:
|
||||
embedded? ? unpage.count : count
|
||||
embedded? ? unpage.length : length
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in a new issue