Initialize cart test helper


/ Published in: Rails
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # CHANGED: Initialize cart.
  2. def initialize_cart
  3. @cart = @request.session[:cart] ||= Cart.create
  4. end

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.