title: How to remove LineItem instance from an order (Spree)
body: <p>I'm working with Spree, but I'm not completely familiar with the built-in methods.
  I'm trying to make it so that when params[:quantity] == 0, the line_item instance gets deleted and removed from the order. I've tried calling destroy! on the instance but that hasn't worked, as well as a few of the other build in functions. </p>
  
  <pre><code>def update
    @order = current_order
    @line_item = Spree::LineItem.find(params[:id])
    @line_item.quantity = params[:quantity]
    @line_item.save
    # can't figure out a way to remove line_item when quantity is set to zero
    @order.update!
  
    respond_with(@order) do |format|
      format.json{render json: @order}
    end
  end
  </code></pre>
  
  <p>Any help is appreciated, thanks in advance!</p>