From df091c7ec5c85dc65ee80b7b92808bd59dd75f73 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Sun, 7 Apr 2019 20:08:11 -0500 Subject: [PATCH] Use the results of the new query object This confirms that we've successfully extracted the code and now we can start removing the old code. --- app/controllers/todos_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index 99e6b741..a004c943 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -1316,7 +1316,6 @@ end end def get_not_done_todos - Todos::UndoneTodosQuery.new(current_user).query(params) if params[:done] not_done_todos = current_user.todos.completed.completed_after(Time.zone.now - params[:done].to_i.days) else @@ -1349,7 +1348,7 @@ end not_done_todos = not_done_todos.where('project_id' => project) end - return not_done_todos + return Todos::UndoneTodosQuery.new(current_user).query(params) end def onsite_redirect_to(destination)