mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
Would a PaginatableArray accept anything else truthy than a number for total_count?
This commit is contained in:
parent
dadb9d249f
commit
4b2121e750
1 changed files with 2 additions and 2 deletions
|
@ -17,11 +17,11 @@ module Kaminari
|
|||
extend Kaminari::PageScopeMethods
|
||||
end
|
||||
|
||||
if @_total_count.present? && (@_total_count <= original_array.count)
|
||||
if @_total_count && (@_total_count <= original_array.count)
|
||||
original_array = original_array.first(@_total_count)[@_offset_value, @_limit_value]
|
||||
end
|
||||
|
||||
if @_total_count.nil?
|
||||
unless @_total_count
|
||||
original_array = original_array[@_offset_value, @_limit_value]
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue