summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard
diff options
context:
space:
mode:
authorAhmad Sherif <me@ahmadsherif.com>2016-08-16 22:10:37 +0200
committerAhmad Sherif <me@ahmadsherif.com>2016-08-18 17:46:24 +0200
commit548da42be51821951180eacf462d942c11c0c01b (patch)
tree56d3335fe86ae4c4a2dfc26951d241c8d762d34e /app/controllers/dashboard
parent30654fc9c1afc222ebae5c5367657bd8f6e615b2 (diff)
downloadgitlab-ce-548da42be51821951180eacf462d942c11c0c01b.tar.gz
Implement TodoService#mark_todos_as_done_by_id
Follow-up on 52b0c26
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r--app/controllers/dashboard/todos_controller.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb
index 1f8cf1d91b0..32f5c09eac1 100644
--- a/app/controllers/dashboard/todos_controller.rb
+++ b/app/controllers/dashboard/todos_controller.rb
@@ -6,9 +6,7 @@ class Dashboard::TodosController < Dashboard::ApplicationController
end
def destroy
- todo = Todo.new(id: params[:id])
-
- TodoService.new.mark_todos_as_done([todo], current_user)
+ TodoService.new.mark_todos_as_done_by_id([params[:id]], current_user)
respond_to do |format|
format.html { redirect_to dashboard_todos_path, notice: 'Todo was successfully marked as done.' }