small medium large xlarge

Generic-user-small
29 Oct 2008, 02:27
Sammy (1 post)

Hi there,

I am stuck in chapter 8, more specifically in 8.3. I have followed all the steps and double checked them and I get this 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.find

RAILS_ROOT: /home/sammy/Projects/depot Application Trace | Framework Trace | Full Trace

app/controllers/store_controller.rb:8:in `add_to_cart’

I assume it complains about the “@items.find” in store_controller…but cant figure out why…

Anyone experienced the same? What am I doing wrong?

Generic-user-small
09 Jan 2009, 06:48
Terjin TJ Dhillon (13 posts)

what does your add_to_cart method in your Store Controller look like?

You must be logged in to comment