Readability 👀
This commit is contained in:
parent
c27c78ebf7
commit
91419fc390
|
@ -36,7 +36,7 @@ module Kaminari
|
|||
count_without_padding = 0 if count_without_padding < 0
|
||||
|
||||
total_pages_count = (count_without_padding.to_f / limit_value).ceil
|
||||
(max_pages && max_pages < total_pages_count) ? max_pages : total_pages_count
|
||||
max_pages && (max_pages < total_pages_count) ? max_pages : total_pages_count
|
||||
rescue FloatDomainError
|
||||
raise ZeroPerPageOperation, "The number of total pages was incalculable. Perhaps you called .per(0)?"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue