i still can’t get the example on page 340 to work.
order = Order.new
params[:products_to_buy].each do |prd_id, qty|
product = Product.find(prd_id)
order.line_items << LineItem.new(:product => product,
:quantity => qty)
end
order.save
What HTML do i need to get the param products_to_buy to have 2 columns?
thanks
↧
Multidimensional Array in rails with HTML posted by Emilio Blanco @ Sat, 16 Aug 2008 00:22:46 +0000
↧