Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h1 class="block">Listing products</h1>
- <div class="column1-unit">
- <% form_for(@products) do |f| %>
- <table>
- <tr>
- <th class="top" scope="col">Name</th>
- <th class="top" scope="col">Vendor</th>
- <th class="top" scope="col">Min</th>
- <th class="top" scope="col">Reorder</th>
- <th class="top" scope="col">Price</th>
- <th class="top" scope="col">Cost</th>
- <th class="top" scope="col">Order</th>
- </tr>
- <% for product in @products %>
- <% fields_for product do |f| %>
- <tr>
- <td><%= f.label "name" %></td>
- <td><%= f.label "vendor.name" %></td>
- <td><%= f.label "min" %></td>
- <td><%= f.label "reorder" %></td>
- <td><%= f.label "price" %></td>
- <td><%= f.label "cost" %></td>
- <td><%= f.text_field "tobeordered" %></td>
- <td><%= link_to 'Show', product %> <%= link_to 'Edit', edit_product_path(product) %> <%= link_to 'Destroy', product, :confirm => 'Are you sure?', :method => :delete %></td>
- </tr>
- <% end %>
- <% end %>
- </table>
- <%= f.submit "Submit" %>
- <%= link_to 'New product', new_product_path %>
- <% end %>
- </div>
- <hr class="clear-contentunit" />
Add Comment
Please, Sign In to add comment