<h1>Listing mats</h1>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Tournament</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <% @mats.each do |mat| %>
      <tr>
        <td><%= mat.name %></td>
        <td><%= mat.tournament_id %></td>
        <td><%= link_to 'Show', mat %></td>
        <td><%= link_to 'Edit', edit_mat_path(mat) %></td>
        <td><%= link_to 'Destroy', mat, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Mat', new_mat_path %>
