Readability 👀

This commit is contained in:
Akira Matsuda 2016-11-23 10:18:07 +09:00
parent c27c78ebf7
commit 91419fc390
1 changed files with 1 additions and 1 deletions

View File

@ -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