else + ternary => elsif + else

This commit is contained in:
Akira Matsuda 2017-06-06 17:03:23 +09:00
parent b0a0ac0031
commit 8e149d5ac5
1 changed files with 4 additions and 2 deletions

View File

@ -33,8 +33,10 @@ module Kaminari
c = c.count(column_name)
@total_count = if c.is_a?(Hash) || c.is_a?(ActiveSupport::OrderedHash)
c.count
else
c.respond_to?(:count) ? c.count(column_name) : c
elsif c.respond_to? :count
c.count(column_name)
else
c
end
end