app/views/documents/search.html.erb
<%= render 'search_form' %>
<h1>Search results</h1>
<table>
<tr>
<th>Title</th>
<th>Content</th>
<th>Private</th>
<th>Download</th>
</tr>
<% @documents.each do |document| %>
<tr>
<td><%= document.title %></td>
<td><%= excerpt(document.content, params[:search], radius: 150, separator: " ") %></td>
<td><%= document.private %></td>
<td><%= link_to "Download", document.file_url.to_s %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New Document', new_document_path %>