123456789101112131415161718192021222324252627282930 |
- <h1>Listing products</h1>
- <table>
- <tr>
- <th>Title</th>
- <th>Description</th>
- <th>Image url</th>
- <th>Price</th>
- <th></th>
- <th></th>
- <th></th>
- </tr>
- <% @products.each do |product| %>
- <tr>
- <td><%= product.title %></td>
- <td><%= product.description %></td>
- <td><%= product.image_url %></td>
- <td><%= product.price %></td>
- <td><%= link_to 'Show', product %></td>
- <td><%= link_to 'Edit', edit_product_path(product) %></td>
- <td><%= link_to 'Destroy', product, :confirm => 'Are you sure?',
- :method => :delete %></td>
- </tr>
- <% end %>
- </table>
- <br />
- <%= link_to 'New Product', new_product_path %>
|