In Rails you can easily use the link_to helper in your templates to create links that will generate HTTP POST, PUT and DELETE requests when clicked. You can do this using simply setting the :method option, but this ease of use hides a very real problem.
The easy fix is to use the button_to helper instead.
The solution (part II)
Of course perhaps you used the link_to helper because you wanted it to look like a standard link on the page (rather than a submit button).
One possible solution would be to use CSS but it’s actually very difficult to use CSS to make a submit button look exactly like (rather than just similar to) your other links across a range of browsers.
And then any submit button with the class ‘submit-link’ will be replaced by a link that will submit the form.
For example the submit button generated by the following would be converted to a link
So there are no excuses for using link_to for destroy/update actions.