summaryrefslogtreecommitdiff
path: root/app/views/matches/index.html.erb
blob: d635834a1b6f7195e43992a1b3c3f6e3b6be0f67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<h1>Listing matches</h1>

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

  <tbody>
    <% @tournament.matches.each do |match| %>
      <tr>
        <td><%= match.tournament %></td>
        <td><%= match.name %></td>
        <td><%= link_to 'Show', tournament_match_path(@tournament, match) %></td>
        <td><%= link_to 'Edit', edit_tournament_match_path(@tournament, match) %></td>
        <td><%= link_to 'Destroy', tournament_match_path(@tournament, match), method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

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