<h1>Post</h1>

<table class='table'>
  <thead>
    <th>Title</th>
    <th>Content</th>
    
    <th colspan=3>Actions</th>
  </thead>
  <tbody>
    <% @posts.each do |post| %>
      <tr>
        <td><%= post.title %></td>
        <td><%= post.content %></td>
      
        <td><%= link_to "Show", post_path(post) %></td>
        <td><%= link_to "Edit", edit_post_path(post) %></td>
        <td>
          <%= link_to "Delete", post_path(post),
            "data-turbo-method": :delete,
            "data-turbo-confirm": "Are you sure?" %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to "New post", new_post_path %>