summaryrefslogtreecommitdiff
path: root/app/views/matches/index.html.erb
blob: 85c94f2d1e7efe0cd017836cf83a14161e8d2aa2 (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
30
31
<h1>Listing matches</h1>

<table>
  <thead>
    <tr>
      <th>Status</th>
      <th>Tournament stage</th>
      <th>Winner</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <% @matches.each do |match| %>
      <tr>
        <td><%= match.status %></td>
        <td><%= match.tournament_stage %></td>
        <td><%= match.winner %></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 %>