<h1>Listing matches</h1>

<table>
  <thead>
    <tr>
      <th>R</th>
      <th>G</th>
      <th>G stat</th>
      <th>R stat</th>
      <th>Winner</th>
      <th>Win type</th>
      <th>Score</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <% @matches.each do |match| %>
      <tr>
        <td><%= match.r_id %></td>
        <td><%= match.g_id %></td>
        <td><%= match.g_stat %></td>
        <td><%= match.r_stat %></td>
        <td><%= match.winner_id %></td>
        <td><%= match.win_type %></td>
        <td><%= match.score %></td>
        <td><%= link_to 'Show', match %></td>
        <td><%= link_to 'Edit', edit_match_path(match) %></td>
        <td><%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Match', new_match_path %>
