I am trying to delete a post using the code below:
<%= link_to \'Destroy\', post, :method => :delete, :onclick => \"return confirm(\'Are you sure you wa
If using link_to with :delete method you must be sure to have javascript active:
link_to
:delete
Note that if the user has JavaScript disabled, the request will fall back to using GET.
As seen in docs
If you don't want to be dependent on javascript you can use button_to instead of link_to.