Could not find table 'line_items'
14 Jan 2013, 16:12
Munirah (1 post)
I am new to Ruby on Rails and I am reading The Agile book. I am just working through the tutorial but got stuck on chapter 10.
I got this error each time I tried to add an item from the Catalogue
Could not find table ‘line_items’
The code in the first one is
The code in the second is
Can someone kindly help me to understand what I am supposed to be doing. I am really just following the tutorial hoping I will understand as I go along..
28 Jan 2013, 03:07
Adrian Lee Elder (9 posts)
Do you have the relationship built between the tables?
has_many :line_items before_destroy :ensure_not_referenced_by_any_line_item
belongs_to :product belongs_to :cart
|You must be logged in to comment|