Skip to content

Commit a099535

Browse files
author
Andrei Shaidurov
committed
Fresh kaminary last_page? behavior fix
1 parent be957aa commit a099535

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/api-pagination.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def pages_from(collection)
2525
pages[:prev] = collection.current_page - 1
2626
end
2727

28-
unless collection.last_page?
28+
unless collection.last_page? || (ApiPagination.config.paginator == :kaminari && collection.out_of_range?)
2929
pages[:last] = collection.total_pages
3030
pages[:next] = collection.current_page + 1
3131
end

0 commit comments

Comments
 (0)