title: How to make a DELETE link to a rails resource?
body: <p>If I want to make a DELETE link in rails, I write the following code (in this example case to delete a user session in Devise):</p>
  
  <pre><code>&lt;%= link_to('Logout', destroy_user_session_path, :method =&gt; :delete) %&gt;
  </code></pre>
  
  <p>That will turn into the following HTML:</p>
  
  <pre><code>&lt;a rel="nofollow" data-method="delete" href="/users/sign_out"&gt;Logout&lt;/a&gt;
  </code></pre>
  
  <p>Works great, except I can't simply put that HTML into a static HTML page. It will simply do a GET request. I assume Rails includes some standard Javascript to turn the above link to one that actually does a DELETE request. So what's the proper way to have a link on a static HTML page to a Rails resource that does a DELETE action? Should I find and grab that Javascript Rails includes in all webpages that does this? Is there a better way?</p>