Guest User

Untitled

a guest
May 25th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. <h1 class="block">Listing products</h1>
  2. <div class="column1-unit">
  3.  
  4. <% form_for(@products) do |f| %>
  5. <table>
  6. <tr>
  7. <th class="top" scope="col">Name</th>
  8. <th class="top" scope="col">Vendor</th>
  9. <th class="top" scope="col">Min</th>
  10. <th class="top" scope="col">Reorder</th>
  11. <th class="top" scope="col">Price</th>
  12. <th class="top" scope="col">Cost</th>
  13. <th class="top" scope="col">Order</th>
  14. </tr>
  15. <% for product in @products %>
  16. <% fields_for product do |f| %>
  17. <tr>
  18. <td><%= f.label "name" %></td>
  19. <td><%= f.label "vendor.name" %></td>
  20. <td><%= f.label "min" %></td>
  21. <td><%= f.label "reorder" %></td>
  22. <td><%= f.label "price" %></td>
  23. <td><%= f.label "cost" %></td>
  24. <td><%= f.text_field "tobeordered" %></td>
  25. <td><%= link_to 'Show', product %> <%= link_to 'Edit', edit_product_path(product) %> <%= link_to 'Destroy', product, :confirm => 'Are you sure?', :method => :delete %></td>
  26. </tr>
  27. <% end %>
  28. <% end %>
  29. </table>
  30. <%= f.submit "Submit" %>
  31. <%= link_to 'New product', new_product_path %>
  32. <% end %>
  33. </div>
  34.  
  35. <hr class="clear-contentunit" />
Add Comment
Please, Sign In to add comment