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
whos/2...
I don''t know if you understand me... It''s complicated for me
explain it.
Actually I have initialized the cart like this:
def find_cart
@cart = (session[:cart] ||= Cart.new)
end
And I have a model cart.rb
My answer is very complicated? or is a simple initialization of cart?
thanks.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.