Agile Web Development with Rails 5

Agile Web Development with Rails 5

There’s a screenshot on top of the page. It’s showing 2 CoffeScript items for the same cart (i.e. for the card with id 1). But in my case, it’s showing only 1 item per cart. So, if I go back and add another item, it creates another cart.

I’m having the same issue. Each time I add an item to a cart it creates a new cart.

The counter for how many times the main page has been viewed works right now. However even after setting the @count back to 0 after the ‘Add to Cart’ button is clicked when I go back to the main page the count is not reset. (Start in store count = 1, click on Add to Cart, count displays as 0, then go back to main page and count is now at 2)