Using Ruby and the Ruby on Rails framework, I've created three links that read from a database, edit a database entry and delete a database entry:
Show:
<a href="/inputs/2">Show</a>
Edit:
<a href="/inputs/2/edit">Edit</a>
Destroy:
<a href="/inputs/2" data-confirm="Are you sure?" data-method="delete" rel="nofollow">Destroy</a>
Edit and show are both GET
s. Delete is a DELETE
. What I want to clarify is, where are these methods defined? Is it in the link parameter data-method="delete"
? In that case, where are there no data-methods set for show and edit? Does rails just assume a link with no data-method is a GET
? And what is the significance of the rel="nofollow"
parameter?