Finishing the Cart
Finish improving the functionality of the cart.
We'll cover the following...
We'll cover the following...
We know by now that to implement the empty-cart function, we have to add a link to the cart and modify the destroy() method in the carts controller to clean up the session.
Start with the template and use the button_to() method in line 12, to add a button:
Modifying the controller
In the controller, let’s modify the destroy() ...