diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2016-12-21 15:02:05 +0000 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2016-12-23 15:09:34 +0000 |
commit | d7a2e92ca0ae7fba4898f2f8ab722033b0721ec9 (patch) | |
tree | 9ae4cf37bbfaa01146136598996c5a6c340040eb /app/controllers/dashboard | |
parent | 805bbe889328bff55b49290294721405148cc980 (diff) | |
download | gitlab-ce-d7a2e92ca0ae7fba4898f2f8ab722033b0721ec9.tar.gz |
applies url_for so that we dont lose filters when redirecting19988-prevent-empty-pagination-when-list-not-empty
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r-- | app/controllers/dashboard/todos_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb index 40652129f4c..e3933e3d7b1 100644 --- a/app/controllers/dashboard/todos_controller.rb +++ b/app/controllers/dashboard/todos_controller.rb @@ -5,7 +5,7 @@ class Dashboard::TodosController < Dashboard::ApplicationController @sort = params[:sort] @todos = @todos.page(params[:page]) if @todos.out_of_range? && @todos.total_pages != 0 - redirect_to dashboard_todos_path(page: @todos.total_pages) + redirect_to url_for(params.merge(page: @todos.total_pages)) end end |