mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
check for Hash in addition to OrderedHash, which seems to break in Rails 4, for total_count
This commit is contained in:
parent
5f62aa5966
commit
982b0583fa
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…
Add table
Add a link
Reference in a new issue