small medium large xlarge

12 Apr 2012, 17:28
Charlene Wroblewski (1 post)

I am trying to debug why the titles are not displaying in the cart. Everything else seems to be working. I see in the server log that it is selecting from the products table for the record, but the following lines display a blank list:

  <% @cart.line_items.each do |item| %>
    <li><% item.product.title %></li>
  <% end %>
20 Apr 2012, 08:35
Ingo Klemm (5 posts)

= is missing in <%

<% @cart.line_items.each do |item| %> <li><%= item.product.title %></li> <% end %>

You must be logged in to comment