The file: app/views/line_items/_line_item.html.erb was created in iteration D2, when we ran the generator: bin/rails generate scaffold LineItem product:references cart:belongs_to
Hmm… it looks like the text editor isn’t escaping the HTML snippet that I added properly, and as a result, not really demonstrating my point.
I realize that in iteration E1 we created a quantity column to the line_items table, but in that iteration, we added it to the _cart.html.erb partial. Later, in iteration E3, we replaced the list item-based approach with a table. But that was still in the cart partial.
In iteration F1, we cleaned up the cart partial by extracting the table-based code into the _line_item.html.erb partial as shown at the bottom of page 147/top of page 148.
What I found confusing was the book shows the change from the do loop to being a render,
it doesn’t directly indicate that the code that was removed needs to replace the existing div-based code in the line_item partial.
I eventually figured it out, but felt that it was worth mentioning, as I could see someone else stumbling here as well. I find that the book is very excellently detailed in the steps that need to be performed, but felt that it was missing something here.