<h1>Listing comments</h1>

<table>
  <tr>
    <th>Post</th>
    <th>User</th>
    <th>Content</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @comments.each do |comment| %>
  <tr>
    <td><%= comment.post %></td>
    <td><%= comment.user %></td>
    <td><%= comment.content %></td>
    <td><%= link_to 'Show', comment %></td>
    <td><%= link_to 'Edit', edit_comment_path(comment) %></td>
    <td><%= link_to 'Destroy', comment, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Comment', new_comment_path %>
