Name | Status | Winner | ||
---|---|---|---|---|
<%= match.name %> | <%= match.status %> | <%= (match.winner.nil? ? "-" : "Team #{match.winner.id}") %> | <%= link_to "Show", tournament_match_path(@tournament, match) %> | <%# 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 %> <%= submit_tag("Start Match", :dissabled => match.teams.count < @tournament.min_teams_per_match) %> <% end %> <% end %> |