I am at the end of Task F: Add a dash of Ajax, and all works as expected until I disable the browsers js capabilities and add something to the cart, when I get:
undefined method `quantity' for nil:NilClass
3: <% else %> 4: <tr> 5: <% end %> 6: <td><%= line_item.quantity %>×</td> 7: <td><%= line_item.product.name %></td> 8: <td class="item_price"><%= number_to_currency(line_item.total_price, unit: "£") %></td> 9: </tr>
There is a note:
Trace of template inclusion: app/views/carts/_cart.html.erb, app/views/layouts/application.html.erb
Can somebody point me in the right direction as to how to debug this and get the app working with js disabled?