title: ActiveRecord::RecordNotFound "can't find without id"
body: <p>I have a method that toggles a boolean, but cannot get it to work at the controller level due to an ActiveRecord not found error. </p>
  
  <p>My <code>items_controller.rb</code>:    </p>
  
  <pre><code>def remove
   @item = Item.friendly.find(params[:id])
   respond_to do |format|
    if @item.toggle_approved
     format.html { redirect_to root_path }
    else
     format.html { render :show }
    end
   end
  end
  </code></pre>
  
  <p>When I set the instance variable like this - <code>@item = Item.friendly.find(params[:id])</code> - I get an error that says <code>Couldn't find Item without an ID</code>. But when I set it like this - <code>@item = Item.find(params[:id])</code> - I get an error that says <code>Couldn't find Item with 'id'=</code>. I'm passing the object as an argument to the path, so I'm not sure why this isn't working.</p>
  
  <p>My view:</p>
  
  <pre><code>&lt;%= link_to "Remove this item", item_remove_path(@item),  class: 'button button-wide red-button', method: :patch %&gt;
  </code></pre>
  
  <p>My <code>routes.rb</code></p>
  
  <pre><code>resources :items do
   patch '/remove', to: 'items#remove', via: :patch
  end
  </code></pre>