title: Sending a DELETE request from Sinatra
body: <p>I am trying to develop a RESTful Sinatra application. Now, I know how to respond to a delete request with something like</p>
  
  <pre><code>delete '/user/:id' do |id|
     #do something in the model
  end
  </code></pre>
  
  <p>What I am interested in is how do I get to execute that method. I can't have link that does a DELETE instead of a GET, can I?</p>
  
  <p>The only solution I found so far is sending a DELETE request via jQuery: <a href="https://stackoverflow.com/questions/2153917/how-to-send-a-put-delete-request-in-jquery">How to send a PUT/DELETE request in jQuery?</a> </p>
  
  <p>I tried looking into different RESTful Sinatra projects on github but my Ruby knowledge is probably to limited to get how they are doing it.</p>