app/models/order_item.rb
# Decreases the quantity of items in the order by the number provided.
#
# @param amount [Fixnum]
Decreases the quantity of items in the order by the number provided.
Decreases the quantity of items in the order by the number provided .
def decrease!(amount = 1)
    transaction do
      self.quantity -= amount
      self.quantity == 0 ? destroy : save!
    end
  end
def decrease! ( amount = 1 ) transaction do self . quantity -= amount self . quantity == 0 ? destroy : save! end end
Decreases the quantity of items in the order by the number provided.
Decreases the quantity of items in the order by the number provided .
# order.remove_delivery_service_if_invalid
amount
None