summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-08-18 16:42:10 +0000
committerRuben Davila <rdavila84@gmail.com>2016-08-18 12:24:03 -0500
commitbb1f4f7b449710ed6ebb6fd4d535c96c84a7463e (patch)
treed22e2fc806bcfc6f4f61099e2001201d4082a69f /app/controllers/dashboard
parentc069568a8394ce3cbe87df781e660a8d0faddb2f (diff)
downloadgitlab-ce-bb1f4f7b449710ed6ebb6fd4d535c96c84a7463e.tar.gz
Merge branch 'fix/simplify-todo-destroy-queries' into 'master'
Simplify SQL queries of marking a todo as done See merge request !5832
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r--app/controllers/dashboard/todos_controller.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb
index 1243bb96d4d..c8390af3b36 100644
--- a/app/controllers/dashboard/todos_controller.rb
+++ b/app/controllers/dashboard/todos_controller.rb
@@ -6,7 +6,7 @@ class Dashboard::TodosController < Dashboard::ApplicationController
end
def destroy
- TodoService.new.mark_todos_as_done([todo], current_user)
+ 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.' }
@@ -27,10 +27,6 @@ class Dashboard::TodosController < Dashboard::ApplicationController
private
- def todo
- @todo ||= find_todos.find(params[:id])
- end
-
def find_todos
@todos ||= TodosFinder.new(current_user, params).execute
end