Thanks Chris for sharing this advanced Ruby on Rails programming technique. Looking forward to more examples like this in future videos? Also, I thought it would be useful to add a background task that periodically, say once a week, removes from the database all cart_item records that don't have an associated user. Keeping these records for a long time only clutters up the database.
Thanks Chris for sharing this advanced Ruby on Rails programming technique.
Looking forward to more examples like this in future videos?
Also, I thought it would be useful to add a background task that periodically, say once a week, removes from the database all cart_item records that don't have an associated user. Keeping these records for a long time only clutters up the database.
Yep, of course. Will be adding that eventually.
Now this is an interesting problem to solve. I solved it in dotnet a while back using similar technique. Good to know.
Had same problem also solved it like this. Also used devise guest gem to transfer guest user objects. Can recommend