diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-06-07 14:45:57 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-06-07 14:45:57 -0500 |
commit | 3ec37e2622f6729300a988c8f58dfb6c2aecb996 (patch) | |
tree | d060b5acf30093cbe1d3642ea6dd11e79ccbf6c5 /app/controllers/dashboard | |
parent | a65f07a256b95ce1c38342518f9469cbf3abf609 (diff) | |
parent | fc1090d9f39231e31f929e37b9703db9738b457c (diff) | |
download | gitlab-ce-3ec37e2622f6729300a988c8f58dfb6c2aecb996.tar.gz |
Merge branch 'master' into 25426-group-dashboard-ui
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r-- | app/controllers/dashboard/todos_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb index 4d7d45787fc..623392c1240 100644 --- a/app/controllers/dashboard/todos_controller.rb +++ b/app/controllers/dashboard/todos_controller.rb @@ -15,7 +15,11 @@ class Dashboard::TodosController < Dashboard::ApplicationController TodoService.new.mark_todos_as_done_by_ids([params[:id]], current_user) respond_to do |format| - format.html { redirect_to dashboard_todos_path, notice: 'Todo was successfully marked as done.' } + format.html do + redirect_to dashboard_todos_path, + status: 302, + notice: 'Todo was successfully marked as done.' + end format.js { head :ok } format.json { render json: todos_counts } end @@ -25,7 +29,7 @@ class Dashboard::TodosController < Dashboard::ApplicationController updated_ids = TodoService.new.mark_todos_as_done(@todos, current_user) respond_to do |format| - format.html { redirect_to dashboard_todos_path, notice: 'All todos were marked as done.' } + format.html { redirect_to dashboard_todos_path, status: 302, notice: 'All todos were marked as done.' } format.js { head :ok } format.json { render json: todos_counts.merge(updated_ids: updated_ids) } end |