diff options
Diffstat (limited to 'app/views/brackets/index.html.erb')
-rw-r--r-- | app/views/brackets/index.html.erb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/app/views/brackets/index.html.erb b/app/views/brackets/index.html.erb new file mode 100644 index 0000000..2195d69 --- /dev/null +++ b/app/views/brackets/index.html.erb @@ -0,0 +1,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 %> |