# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
# Home page
GET / controllers.Application.index()
# Tasks
GET /tasks controllers.Application.tasks()
POST /tasks controllers.Application.newTask()
POST /tasks/:id/delete controllers.Application.deleteTask(id: Long)
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(path="/public", file)
URL:
http://localhost:9000/tasks/2/delete
エラー:
Action not found
For request 'GET /tasks/2/delete'
These routes have been tried, in this order:
1 GET / controllers.Application.index()
2 GET /tasks controllers.Application.tasks()
3 POST /tasks controllers.Application.newTask()
4 POST /tasks/$id<[^/]+>/delete controllers.Application.deleteTask(id:Long)
5 GET /assets/$file<.+> controllers.Assets.at(path:String = "/public", file:String)
HTML フラグメント:
<form action="/tasks/2/delete" method="POST" >
<input type="submit" value="Delete">
</form>
ルール 4 が適用できない理由がわかりません。
私の間違いはどこですか?