forked from sammyzanny/restaurant-pos-mod2-group-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
oldcode.txt
34 lines (28 loc) · 958 Bytes
/
oldcode.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<table class="ui striped table">
<thead>
<tr>
<th>Food</th>
<th>Price</th>
<th>Modifications</th>
</tr>
</thead>
<tbody>
<% @foods.where(food_type: "Appetizer").each do |food| %>
<tr>
<td><%= food.name %></td>
<td><%=number_to_currency(food.price, unit: '$') %></td>
</tr>
<% end %>
</tbody>
</table>
<h3>Check <%= "#{@check.id}" %></h3>
<% @check.orders.each do |order| %>
<%= order.food.name %>............$<%= order.food.price %> - <%= link_to "Add modification", new_order_modification_path(order.id) %> - <%= link_to 'Remove Item', order, method: :delete %><br>
<% if order.modifications.any? %>
<ul>
<% order.modifications.each do |m| %>
<li><%= m.note %>............$<%= m.price %> - <%= link_to 'Remove Modifier', order_modification_path(order, m), method: :delete %></li>
<% end %>
</ul>
<% end %>
<% end %>