<div class="app"> <table> <% @results.each do |res| %> <tr> <td> <%= link_to(res.topic.subject, {:action => 'postshow', :id => res.id}) %> </td> </tr> <% end %> </table> </div>