diff options
author | tkimia <tkimia@purdue.edu> | 2014-04-06 22:16:05 -0400 |
---|---|---|
committer | tkimia <tkimia@purdue.edu> | 2014-04-06 22:16:05 -0400 |
commit | 546b5895e7fe48d7f2e3c1032622805ee8fba090 (patch) | |
tree | 40293728151a1347d33dcda7a0ecd917904af8ba /app/views | |
parent | 5084f01e0ea7ba7c378982099fdbf9880857f091 (diff) |
matches start
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/matches/index.html.erb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 6fd831f..052d176 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -18,7 +18,15 @@ <td><%= match.id%></td> <td><%= match.name %></td> <td><%= link_to "Show", tournament_match_path(@tournament, match) %> - <td><%= submit_tag("Start Match") %> + <td> <%# If user is the host, let them start the tournment %> + <% if @tournament.hosts.include?(current_user) %> + + <%= form_tag(tournament_match_path(@tournament, match), method: "put") do %> + <input type="hidden" name="update_action" value="start"> + <%= submit_tag("Start Match") %> + <% end %> + <% end %> +</div></td> </tr> <% end %> </tbody> |