Closed syrm closed 2 years ago
Hello,
I have this setup :
GET /post/:id Post.Edit GET /post Post.Edit
With my controller like that :
func (c Post) Edit() revel.Result { id := c.Params.Get("id")
And in my template :
{{url "Post.Edit"}} {{url "Post.Edit" .Id}}
And i get this error :
ERROR 18:38:24 revel revel_logger.go:39: render: Template Execution Error (in Page/Index.html): 9: executing "Page/Index.html" at <url "Post.Edit" .Id>: error calling url: reversing Post.Edit: route defines 0 args, but received 1 section=results
REVEL wants to make things easier, so it pulls out your parameter from the request for you. Your function signature should be
func (c Post) Edit(id string) revel.Result { ...
Hello,
I have this setup :
With my controller like that :
And in my template :
And i get this error :