Skip to content

Commit 58ad95d

Browse files
Remove last link when using pagy (#85)
1 parent b62c861 commit 58ad95d

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
@@ -76,7 +76,7 @@ def pagy_pages_from(pagy)
7676
end
7777

7878
unless pagy.page == pagy.pages
79-
pages[:last] = pagy.pages
79+
pages[:last] = pagy.pages if ApiPagination.config.include_total
8080
pages[:next] = pagy.next
8181
end
8282
end

0 commit comments

Comments
 (0)