I am recently following Agile book to iteration E3. In this iteration, I could "successfully" empty cart with correct view and passed test as tutorial showed. However, in rails'console, when I check `Cart.all`, corresponding cart still exists; when I force to <http://localhost:3000/carts/1>; I saw all previous selected line items still exist. I thought when the destroy is invoked, cart and corresponding line-item should be destroyed from database but it seems not. Where did I misunderstand? Could someone explain why this happaned? I pushed my source code into github: <https://github.com/WeiliangXing/depot-rails.git>
Also I found session[:card\_id] is equal to nil, which is supposed to have something because I use set\_cart method in LineItemController to set current\_cart session. Can someone help me to figure out why?