Displaying 1 result from an estimated 1 matches for "add_dish".
Did you mean:
add_disk
2006 Feb 27
2
Find not working
Hello all.
I have the following code (taken from the depot tutorial then modified)
def add_dish( dish, type, qnty )
item = @items.find {|i| i.dish_id == dish.id && i.type == type }
if item
item.quantity += qnty.to_i
else
if type == ''Fresh''
item = Fresh.for_dish(dish)
else
item = Frozen.for_dish(dish)
end
item....