diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2016-12-19 10:26:12 +0000 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2016-12-21 23:53:24 +0000 |
commit | 9b66aa6e04ab66af7ce11e26076ebf431ca938c5 (patch) | |
tree | 82f5f8753c4803c55aa2b19b4e085e790b701e43 /app/controllers/projects/issues_controller.rb | |
parent | c7ee5742337c799e7a2bda0d74756b7e51770fca (diff) | |
download | gitlab-ce-9b66aa6e04ab66af7ce11e26076ebf431ca938c5.tar.gz |
Prevent empty pagination when list is not empty
Diffstat (limited to 'app/controllers/projects/issues_controller.rb')
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 4f66e01e0f7..ec09a5297fc 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -5,6 +5,7 @@ class Projects::IssuesController < Projects::ApplicationController include ToggleAwardEmoji include IssuableCollections include SpammableActions + include KaminariPagination before_action :redirect_to_external_issue_tracker, only: [:index, :new] before_action :module_enabled @@ -24,7 +25,7 @@ class Projects::IssuesController < Projects::ApplicationController def index @issues = issues_collection - @issues = @issues.page(params[:page]) + @issues = bounded_pagination(@issues, params[:page]) if params[:label_name].present? @labels = LabelsFinder.new(current_user, project_id: @project.id, title: params[:label_name]).execute |