Am Freitag, den 23.12.2005, 08:27 +0100 schrieb Naroor Rathish:
> can anyone tell me how is the following lines in ruby works on rails
> .how is the key value pairs accessed by rails .
> params[:invoiceitem].each do |key, val|
> @invoice.invoiceitems << InvoiceItem.new(val)
Started writing to answer your question a few times, but everytime i
felt not rightly understood it.
If params[:invoiceitem] contains a Hash, the key valus pairs would be
accessed like from a Hash. There is no magic. params is a Hash by