<%= stylesheet_link_tag "categories" %>

<h1>Categories</h1>
<div class="container grid-md">
  <div class="columns">
    <div class="column centered">
      <table class="table table-hover">
        <thead>
          <tr>
            <th>Name</th>
            <th>Amount of books</th>
            <th>Actions</th>
            <th></th>
          </tr>
        </thead>

        <tbody>
          <% @categories.each do |category| %>
            <tr>
              <td><%= category.name %></td>
              <td><%= category.books.count %></td>
              <td><%= link_to "Edit", edit_category_path(category), class: "btn btn-sm btn-warning" %></td>
              <td><%= link_to "Delete", category, method: :delete, class: "btn btn-sm btn-danger" %></td>
            </tr>
          <% end %>
        </tbody>
      </table>
      <br>
    </div>
  </div>
</div>
<%= stylesheet_link_tag "categories" %>

<h1>Categories</h1>
<div class="container grid-md">
  <div class="columns">
    <div class="column centered">
      <table class="table table-hover">
        <thead>
          <tr>
            <th>Name</th>
            <th>Amount of books</th>
            <th>Actions</th>
            <th></th>
          </tr>
        </thead>

        <tbody>
          <% @categories.each do |category| %>
            <tr>
              <td><%= category.name %></td>
              <td><%= category.books.count %></td>
              <td><%= link_to "Edit", edit_category_path(category), class: "btn btn-sm btn-warning" %></td>
              <td><%= link_to "Delete", category, method: :delete, class: "btn btn-sm btn-danger", :data => {:confirm => 'Are you sure?'} %></td>
            </tr>
          <% end %>
        </tbody>
      </table>
      <br>
    </div>
  </div>
</div>
Add confirm to category delete
Add confirm to category delete
