I’m working through the cart creation and I keep receiving and undefined error in Chapter 9. I believe the problem is the code in ApplicationController at the top of page 110.
class ApplicationController < ActionController::Base protect_from_forgery
def current_cart Cart.find(session[:cart_id]) rescue ActiveRecord::RecordNotFound cart = Cart.create session[:cart_id] = cart.id cart end end
I can’t get it to run if it’s private… wasn’t the intention to make it protected and not private? Or does the main application controller have some special rule?