Most implementations of shopping carts I have seen is that a user stores line items in a cart, where the line items represent products or subscriptions. So a cart has many products through line items and a product can have many carts through line items. Then a customer makes an order and so you introduce a new model order. The order has information such as customer's name, the payment type, and if you are working with a payment gateway, such as paypal, it will contain paypal tokens and recurring tokens. So the order and the cart are two different models, two different purposes. Cart is a thing that enables a customer to store things in, and a order is the thing that handles payments. So I was watching this railscasts and he updates a purchased_at attribute on the cart itself:
http://railscasts.com/episodes/142-paypal-notifications?view=comments But is a cart really purchased, or is it the order that is purchased? If the order contains all payment information, shouldn't the order contain the purchased_at attribute and not the cart? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.