<p id="notice"><%= notice %></p>

<h1>Listing Documents</h1>

<table>
  <thead>
    <tr>
      <th>Title</th>
      <th>Content</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @documents.each do |document| %>
      <tr>
        <td><%= document.title %></td>
        <td><%= document.content %></td>
        <td><%= link_to 'Show', document %></td>
        <td><%= link_to 'Edit', edit_document_path(document) %></td>
        <td><%= link_to 'Destroy', document, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Document', new_document_path %>

<p id="notice"><%= notice %></p>

<h1>Listing Documents</h1>

<p><%= @documents.count %> records</p>

<%= form_tag(documents_path, method: "get") do %>
  <%= search_field_tag "query", params["query"] %>
  <%= submit_tag "Search" %>
<% end %>

<table>
  <thead>
    <tr>
      <th>Title</th>
      <th>Content</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @documents.each do |document| %>
      <tr>
        <td><%= document.title %></td>
        <td><%= document.content %></td>
        <td><%= link_to 'Show', document %></td>
        <td><%= link_to 'Edit', edit_document_path(document) %></td>
        <td><%= link_to 'Destroy', document, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Document', new_document_path %>

Add UI for full text search
Add UI for full text search
