Hi, I want to make a cart that actually I initialize with my session. It
works right and one user has one cart but… If I want to make differents
carts for differents controllers?
I have the plugin acts_as_tree and I have a whos_controller that has
many products. These products can add to cart and in every
whos_controller in the show view I show the cart and I can add more
items to cart. I want to show a cart for whos/1, a different cart for
I don’t know if you understand me… It’s complicated for me explain it.
Actually I have initialized the cart like this:
@cart = (session[:cart] ||= Cart.new)
And I have a model cart.rb
My answer is very complicated? or is a simple initialization of cart?