Introduce per_page parameter for custom page size

This commit is contained in:
Sebastian Serth
2022-01-12 20:38:34 +01:00
parent 9d53ff20b5
commit 0a6ae91db8
17 changed files with 28 additions and 20 deletions

View File

@ -11,7 +11,7 @@ class ErrorTemplatesController < ApplicationController
# GET /error_templates
# GET /error_templates.json
def index
@error_templates = ErrorTemplate.all.order(:execution_environment_id, :name).paginate(page: params[:page])
@error_templates = ErrorTemplate.all.order(:execution_environment_id, :name).paginate(page: params[:page], per_page: per_page_param)
authorize!
end