From: Ira W. Snyder Date: Thu, 22 Nov 2007 00:34:35 +0000 (-0800) Subject: Add title to the rentable listing X-Git-Tag: turned-in~79 X-Git-Url: https://www.irasnyder.com/gitweb/?a=commitdiff_plain;h=7f022bf8ebbaa4c6949fda80ab7246680a933494;p=cs356-p2-videostore.git Add title to the rentable listing Signed-off-by: Ira W. Snyder --- diff --git a/app/views/rentable/list.rhtml b/app/views/rentable/list.rhtml index 74c1cbc..0fe063d 100644 --- a/app/views/rentable/list.rhtml +++ b/app/views/rentable/list.rhtml @@ -2,13 +2,17 @@ + <% for column in Rentable.content_columns %> <% end %> - + <% for rentable in @rentables %> + <% for column in Rentable.content_columns %> <% end %> diff --git a/db/development.sqlite3 b/db/development.sqlite3 index 3d63cdb..7a033ca 100644 Binary files a/db/development.sqlite3 and b/db/development.sqlite3 differ
Title<%= column.human_name %>
+ <%=h Video.find(:first, :conditions => "rentable_id='#{rentable.id}'").title.to_s if Video.find(:first, :conditions => "rentable_id='#{rentable.id}'") %> + <%=h rentable.send(column.name) %>