> Probably. > > You could always add a parameter to your CartItem#initialize method. > I'm > not sure that you're heading in the direction you want to be heading, > since > it appears that CartItem is not derived from ActiveRecord::Base -- it's > not > tied to a database. > > You might want to go back and study Rail's ideas regarding models, how > they > tie to database tables, and how you can initialize them.
I following along from the book DHH wrote verbatim, but it's the second edition. It was my understanding that having a database table for the cart was unnecessary because it's session data and would be avaliable based on that user? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

