title: Getting a form to use :method => :delete (rails)
body: <p>I have a cart which contains many line_items. I'd like to have a "delete" button next to each line item that, upon clicked, removes the line_item from the cart. </p>
  
  <p>I know I can do this with a button_to method, but I'd like to use form_for because I'd like to change the attributes of the line_item's parent object at the same time (each line_item also belongs to a course, and I'd like to tell the course parent that it's no longer in the cart). </p>
  
  <p>Here's my code using form_for:</p>
  
  <pre><code>&lt;%= form_for(line_item, :method =&gt; :delete, :remote =&gt; true) do |f| %&gt;
  &lt;%= f.submit :value =&gt; "Delete" %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>The ruby documentation says that simply adding :method => :delete should work (http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_for), but the rendered html isn't quite right. It's still </p>
  
  <pre><code>&lt;input name="_method" type="hidden" value="put"&gt;
  </code></pre>
  
  <p>But it should be:</p>
  
  <pre><code>&lt;input name="_method" type="hidden" value="delete"&gt;
  </code></pre>
  
  <p>What am I doing wrong? </p>