mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
Merge pull request #369 from aew/master
Fix total_count to work for Rails 4 (Ruby 2)
This commit is contained in:
commit
69e44c6f15
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ module Kaminari
|
|||
|
||||
# .group returns an OrderdHash that responds to #count
|
||||
c = c.count(column_name, options)
|
||||
if c.is_a?(ActiveSupport::OrderedHash)
|
||||
if c.is_a?(Hash) || c.is_a?(ActiveSupport::OrderedHash)
|
||||
c.count
|
||||
else
|
||||
c.respond_to?(:count) ? c.count(column_name, options) : c
|
||||
|
|
Loading…
Reference in a new issue