title: No route matches [GET]
body: <p>I'm trying to add 'add to cart' method for my items.</p>
  
  <p>items_controller:</p>
  
  <pre><code>def to_cart
    @item = Item.friendly.find(params[:id]) 
    @item.add_to_cart
    redirect_to root_path
  end
  </code></pre>
  
  <p>routes:</p>
  
  <pre><code>resources :items do
    put :to_cart, on: :member
  end
  </code></pre>
  
  <p>model:</p>
  
  <pre><code>def add_to_cart
    current_user.cart.items &lt;&lt; self
    current_user.cart.save
  end
  </code></pre>
  
  <p>show:</p>
  
  <pre><code>&lt;%= @item.name  %&gt;
  &lt;%= link_to 'add to cart', to_cart_item_path(@item) %&gt;
  </code></pre>
  
  <p>I got RoutingError: <code>No route matches [GET] "/items/first/to_cart"</code>
  'first' because of friendly id. 
  What I did wrong?</p>