Add title to the rentable listing
authorIra W. Snyder <devel@irasnyder.com>
Thu, 22 Nov 2007 00:34:35 +0000 (16:34 -0800)
committerIra W. Snyder <devel@irasnyder.com>
Thu, 22 Nov 2007 00:34:35 +0000 (16:34 -0800)
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
app/views/rentable/list.rhtml
db/development.sqlite3

index 74c1cbc..0fe063d 100644 (file)
@@ -2,13 +2,17 @@
 
 <table>
   <tr>
+    <th>Title</th>
   <% for column in Rentable.content_columns %>
     <th><%= column.human_name %></th>
   <% end %>
   </tr>
-  
+
 <% for rentable in @rentables %>
   <tr>
+    <td>
+      <%=h Video.find(:first, :conditions => "rentable_id='#{rentable.id}'").title.to_s if Video.find(:first, :conditions => "rentable_id='#{rentable.id}'") %>
+    </td>
   <% for column in Rentable.content_columns %>
     <td><%=h rentable.send(column.name) %></td>
   <% end %>
index 3d63cdb..7a033ca 100644 (file)
Binary files a/db/development.sqlite3 and b/db/development.sqlite3 differ