small medium large xlarge

Generic-user-small
19 May 2009, 16:10
Omar Shaat (3 posts)

Hi all,

When I browse http://localhost:3000/store/checkout I get the following error:

NoMethodError in Store#checkout

Showing app/views/layouts/store.html.erb where line #22 raised:

You have a nil object when you didn’t expect it! The error occurred while evaluating nil.items Extracted source (around line #22):

19: News
20: Contact
21: 22: <% hidden_div_if(@cart.items.empty?, :id => “cart”) do %> 23: <%= render(:partial => “cart”, :object => @cart) %> 24: <% end %> 25: </div>

Can you help me please?

Generic-user-small
19 May 2009, 16:53
Omar Shaat (3 posts)

LOL! I realized that I added the checkout method after the private declaration :)

You must be logged in to comment