diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2016-12-21 18:02:05 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2016-12-23 18:09:34 +0300 |
commit | d7a2e92ca0ae7fba4898f2f8ab722033b0721ec9 (patch) | |
tree | 9ae4cf37bbfaa01146136598996c5a6c340040eb /app/controllers/dashboard/todos_controller.rb | |
parent | 805bbe889328bff55b49290294721405148cc980 (diff) |
applies url_for so that we dont lose filters when redirecting
Diffstat (limited to 'app/controllers/dashboard/todos_controller.rb')
-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 |