in the code for add_line_items_from_cart(cart)
it uses
line_items << li
where line_items is defined as a
has_many :line_items
which is a an instance variable
so in the code should it not be
@line_items << li
as i thought
line_items would be declared as a local variable