We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e0e1bf commit 0806da5Copy full SHA for 0806da5
lib/api-pagination.rb
@@ -7,7 +7,7 @@ class << self
7
8
def paginate(collection, options = {})
9
options[:page] ||= 1
10
- options[:per_page] ||= 25
+ options[:per_page] = (options[:per_page].to_i <= 0 ? 25 : options[:per_page])
11
12
case ApiPagination.paginator
13
when :kaminari
0 commit comments