<table>
<tr>
- <th>ID</th>
- <th>Title</th>
<% for column in Rentable.content_columns %>
<th><%= column.human_name %></th>
<% end %>
<% for rentable in @rentables %>
<tr>
- <td><%=h rentable.id %></td>
- <td>
- <% if Game.find(:first, :conditions => "rentable_id='#{rentable.id}'") %>
- Game
- <% elsif Video.find(:first, :conditions => "rentable_id='#{rentable.id}'") %>
- Video
- <% else %>
- ERROR
- <% end %>
- </td>
<% for column in Rentable.content_columns %>
<td><%=h rentable.send(column.name) %></td>
<% end %>