Make the table titles in the game list match the data
[cs356-p2-videostore.git] / app / views / coitem / list.rhtml
index 44b9c2d..f6514cb 100644 (file)
@@ -4,6 +4,7 @@
   <tr>
   <th>Customer</th>
   <th>Rentable</th>
+  <th>Overdue</th>
   <% for column in Coitem.content_columns %>
     <th><%= column.human_name %></th>
   <% end %>
@@ -11,8 +12,9 @@
   
 <% for coitem in @coitems %>
   <tr>
-  <td><%=h Customer.find(coitem.customer_id).name %></td>
-  <td><%=h Rentable.find(coitem.rentable_id).title %></td>
+  <td><%=h coitem.customer.name %></td>
+  <td><%=h coitem.rentable.title %></td>
+  <td><%=h coitem.overdue? %></td>
   <% for column in Coitem.content_columns %>
     <td><%=h coitem.send(column.name) %></td>
   <% end %>