Added complete button

This commit is contained in:
KaungKaung
2026-01-28 14:59:13 +06:30
parent 0f5d105be3
commit 7c9e164a9a
6 changed files with 55 additions and 16 deletions

View File

@@ -22,6 +22,16 @@ class TasksController < ApplicationController
@task.destroy
end
def complete
@task = @project.tasks.find(params[:id])
@task.update(status: "done")
respond_to do |format|
format.turbo_stream
format.html { redirect_to @project }
end
end
private
def set_project