On Wed, Apr 22, 2009 at 3:59 PM, elliottg <[email protected]> wrote:

> def update_cart
>  i = 0
> �...@cart = find_cart # A Session based Cart instance
>  params[:items].each do |k, v|
>   �[email protected][i].quantity = "#{v}".to_i
>    i += 1
>  end
> end

without seeing the rest of the cart code, this is just a guess, but
shouldn't
@cart.items[i].quantity = "#{v}".to_i
be
@cart.items[k].quantity = "#{v}".to_i

FWIW,
-- 
Hassan Schroeder ------------------------ [email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to