Forum: Ruby on Rails NoMethodError in StoreController#add_to_cart

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Frank C. (Guest)
on 2009-04-23 20:11
Working through the Agile Web D. w/ Rails book on p114.  I can
add single items of each to the cart but when I try to add a second item
I get the following error:

 NoMethodError in StoreController#add_to_cart

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.+

Any idea why this is happening?  Thanks.

This topic is locked and can not be replied to.