<% if @tournament.hosts.include? @current_user %> <input type="hidden" name="update_action" value="finish" > <% @match.teams.each do |team| %> <label> <input type="radio", name="win", value="<%= team.id %>" > <%= "Team #{team.id} Won" %> </label> <% end %> <br> <input type="submit", value="Finish match" > <% else %> <p>The match is running; the host has yet to post the scores of the match.</p> <% end %>