app/models/item.rb
# Returns true if this item is associated with an open order that has been confirmed
Returns true if this item is associated with an open order that has been confirmed
Returns true if this item is associated with an open order that has been confirmed
def has_confirmed_order?
    confirmed_order = false
    open_orders.each do |o|
      if o.confirmed
        confirmed_order = true
        break
      end
    end
    confirmed_order
  end
def has_confirmed_order? confirmed_order = false open_orders . each do | o | if o . confirmed confirmed_order = true break end end confirmed_order end
Returns true if this item is associated with an open order that has been confirmed
Returns true if this item is associated with an open order that has been confirmed