Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h1>Products</h1>
- <table>
- <% @products.each do |product| %>
- <tr class="<%= cycle('list_line_odd', 'list_line_even')%>">
- <td><%= image_tag(product.image_url,class:'list_image')%></td>
- <td class="list_description">
- <dl>
- <dt><%= product.title%></dt>
- <dd><%= truncate(strip_tags(product.description),length: 80)%></dd>
- </dl>
- </td>
- <td><%= link_to 'Show', product %></td>
- <td><%= link_to 'Edit', edit_product_path(product) %></td>
- <td><%= link_to 'Destroy', product, method: :delete, data: { confirm: 'Are you sure?' } %></td>
- </tr>
- <% end %>
Add Comment
Please, Sign In to add comment