I have the scenario where by i have an anonymous checkout on a shop, but
somtimes i tihnk if there are concurrent users (lets say users A and
B), user A gets there results they would expect on the review page, but
user B gets user A’s details?!?!
How can this even be happening as in the controller code im using the
session[:order_id] to identify shopping baskets and the like. I have
just moved to AR sessions from PStore, is there some issue with AR
sessions comparitivly to PStore?
Is the @your_order var somhow becomming populated with somone elses
details before the view is rendered? i really cant see how this is
happening. Any help would be a godsend!!!
The code in my controller…
@your_order = Order.find(session[:order_id])
@contents = @your_order.items
flash[:notice] = ‘Unfortunatly all the data required to enable you
to checkout was unobtainable.’
@subtotal = @your_order.item_total(session[:currency].to_i)
if @your_order.seperate_shipping_address == true
@delivery_address = @billing_address