summaryrefslogtreecommitdiff
path: root/app/views/brackets/index.html.erb
blob: 2195d698daa70ffcbe1ffc3ca4fff8c462dae0b2 (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 brackets</h1>

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

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

<br>

<%= link_to 'New Bracket', new_bracket_path %>