Pergunta

Play2 supports restful url, we can define in "routes" file:

DELETE   /users/:id   controllers.Users.delete(id)

But how do I create such a link in template? Is there a helper method to use, or do I have to add a special parameter in the url?

Foi útil?

Solução

DELETE is not supported by HTML yet. There is a proposal so it's supported in HTML 5, but it's not implemented anywhere.

So, no, you can't trigger that from a template directly. Jquery Ajax allows you to use PUT or DELETE, but that is not supported by all browsers.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top