Sanitise pagination input for new API

This commit is contained in:
Maikel Linke
2022-02-15 13:17:31 +11:00
parent 75fc35574e
commit b89715149c
2 changed files with 6 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ module JsonApiPagination
end
def current_page
params[:page] || 1
(params[:page] || 1).to_i
end
def total_pages