title: Editing Quantity in Cart
body: <p>So this is another post about updating the quantity in the cart!  Any one that I could find seemed to be outdated, so I apologize if this seems repetative.</p>
  
  <p>But I am following along in Agile Web Development with Rails 4th edition book, and they were so kind as to leave editing the quantity as a 'challenge' and not show the answer :D.  Now as I'm trying to get it to work I'm having troubles.</p>
  
  <p>Show in my views/cart/show.html.erb I have the following table</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;th&gt;Quantity&lt;/th&gt;
          &lt;th&gt;Product Name&lt;/th&gt;
          &lt;th&gt;Size&lt;/th&gt;
          &lt;th&gt;Price&lt;/th&gt;
      &lt;/tr&gt;
  &lt;% @cart.line_items.each do |item| %&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;%= form_for 'item', :url =&gt; {:controller =&gt; 'line_items', :action =&gt; 'update', id: item} do |f| %&gt;
                  &lt;div class="field"&gt;
                      &lt;%= f.number_field :qty, :value =&gt; item.qty %&gt;
                      &lt;%= submit_tag "Update" %&gt;
                  &lt;/div&gt;
              &lt;% end %&gt;
          &lt;/td&gt;
          &lt;td&gt;&lt;%= item.product.name %&gt;&lt;/td&gt;
          &lt;td&gt;&lt;%= item.size %&gt;&lt;/td&gt;
          &lt;td&gt;&lt;%= number_to_currency(item.total_price) %&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;% end %&gt;
      &lt;tr&gt;
          &lt;td colspan="3"&gt;Total Price&lt;/td&gt;
          &lt;td&gt;&lt;%= number_to_currency(@cart.total_price) %&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Yet when I click update I get either </p>
  
  <blockquote>
    <p>Unknown action</p>
    
    <p>The action '29' could not be found for LineItemsController</p>
  </blockquote>
  
  <p>or </p>
  
  <blockquote>
    <p>Unknown action</p>
    
    <p>The action '35' could not be found for LineItemsController</p>
  </blockquote>
  
  <p>even if I completely take out the id field.  I can deal with the update function on the controller side and getting it update properly - I want to figure that out on my own but I can't figure out what could possibly be generating these numeric actions and how I can fix it.  In short, what is producing this error and how can I fix it?  Is it perhaps related to the fact I have a line_item form in a cart view?  </p>