↧
Multidimensional Array in rails with HTML posted by Emilio Blanco @ Mon, 19...
Hi! In page 335 of the book, there shows an example of has_many declaration, where it process the order, and it uses the params array and slipts it in two variables “prd_id” and “qty”, whats the HTML...
View ArticleMultidimensional Array in rails with HTML posted by Emilio Blanco @ Sat, 16...
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 =>...
View ArticleMultidimensional Array in rails with HTML posted by Sam Ruby @ Sat, 16 Aug...
It is not exactly an array, it actually is a hash. Here’s some HTML which will product a products_to_buy hash containing product ids and their corresponding quantity:<% for item in @order.line_items...
View ArticleMultidimensional Array in rails with HTML posted by Emilio Blanco @ Sat, 16...
Now i get it ;)thanks for the info Sam!
View Article