implemented forum post controller

This commit is contained in:
albert
2011-01-13 18:16:39 -05:00
parent 523cc9fe02
commit 541163685d
13 changed files with 121 additions and 42 deletions

View File

@@ -0,0 +1,26 @@
<%= render "search" %>
<table>
<thead>
<tr>
<th>Topic</th>
<th>Excerpt</th>
<th>Creator</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<% @forum_posts.each do |forum_post| %>
<tr>
<td><%= forum_post.topic.title %></td>
<td><%= truncate forum_post.body, :length => 50 %></td>
<td><%= forum_post.creator.name %></td>
<td><%= forum_post.created_at %></td>
</tr>
<% end %>
</tbody>
</table>
<div id="paginator">
<%= will_paginate @forum_posts %>
</div>