X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=app%2Fviews%2Forders%2Findex.html.erb;fp=app%2Fviews%2Forders%2Findex.html.erb;h=39e117ecda9b3a5ac7514eb0116bac0f57f0bf10;hb=3ac66882338fa1c3f6d73ba68093b7fcfb399574;hp=0000000000000000000000000000000000000000;hpb=1b429173b63fb15c46a8bc319ae58e9c5584054c;p=depot.git diff --git a/app/views/orders/index.html.erb b/app/views/orders/index.html.erb new file mode 100644 index 0000000..39e117e --- /dev/null +++ b/app/views/orders/index.html.erb @@ -0,0 +1,26 @@ +<h1>Listing orders</h1> + +<table> + <tr> + <th>Name</th> + <th>Address</th> + <th>Email</th> + <th>Pay type</th> + </tr> + +<% for order in @orders %> + <tr> + <td><%=h order.name %></td> + <td><%=h order.address %></td> + <td><%=h order.email %></td> + <td><%=h order.pay_type %></td> + <td><%= link_to 'Show', order %></td> + <td><%= link_to 'Edit', edit_order_path(order) %></td> + <td><%= link_to 'Destroy', order, :confirm => 'Are you sure?', :method => :delete %></td> + </tr> +<% end %> +</table> + +<br /> + +<%= link_to 'New order', new_order_path %>