- <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 %>
- <td><%= link_to 'Show', :action => 'show', :id => coitem %></td>
- <td><%= link_to 'Edit', :action => 'edit', :id => coitem %></td>
- <td><%= link_to 'Destroy', { :action => 'destroy', :id => coitem }, :confirm => 'Are you sure?', :method => :post %></td>
+ <td><%=h coitem.rentable.id.to_s %></td>
+ <td><%=h coitem.customer.name %></td>
+ <td><%=h coitem.rentable.class %></td>
+ <% if coitem.rentable.type == Game %>
+ <td><%=link_to coitem.rentable.title.to_s, :controller => 'game', :action => 'show', :id => coitem.rentable %></td>
+ <% else %>
+ <td><%=link_to coitem.rentable.title.to_s, :controller => 'video', :action => 'show', :id => coitem.rentable %></td>
+ <% end %>
+ <td><%=h tf_to_yesno(coitem.overdue?) %></td>
+ <td><%=h coitem.out_date %></td>
+ <td><%=h coitem.due_date %></td>