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.
This commit is contained in:
Matt Rogers 2019-04-07 20:08:11 -05:00
parent eb7c34e973
commit df091c7ec5
No known key found for this signature in database
GPG key ID: 605D017C07EB4316

View file

@ -1316,7 +1316,6 @@ end
end end
def get_not_done_todos def get_not_done_todos
Todos::UndoneTodosQuery.new(current_user).query(params)
if params[:done] if params[:done]
not_done_todos = current_user.todos.completed.completed_after(Time.zone.now - params[:done].to_i.days) not_done_todos = current_user.todos.completed.completed_after(Time.zone.now - params[:done].to_i.days)
else else
@ -1349,7 +1348,7 @@ end
not_done_todos = not_done_todos.where('project_id' => project) not_done_todos = not_done_todos.where('project_id' => project)
end end
return not_done_todos return Todos::UndoneTodosQuery.new(current_user).query(params)
end end
def onsite_redirect_to(destination) def onsite_redirect_to(destination)