Excellent book, I like how it takes you through an entire application instead of focusing on code snippets.
I do have a problem though. When a cart is created and stored in the session, it (and all related line items) remains in the database when the session expires (i.e. times out) and if this was a real application then those tables would fill up pretty quickly and slow down the system.
I’m quite new to Rails so I’m not sure how to fix this, is there a way to “associate” the line items and cart records in the database with the session so that Rails knows to remove those records when the session expires or will I need to create some sort of cron job to clean them up periodically?