Status: <%= @match.status %>

Tournament: <%= @match.tournament.id %>

Name: <%= @match.name %>

<% if (@match.status==1) %> <% if (@tournament.players.include?(current_user) || @tournament.hosts.include?(current_user)) %> <% @match.teams.each do |team| %>
    <% team.users.collect{|u| u.user_name}.each do |k| %>
  1. <%= k %>
  2. <% end %>
<% end %> <% end %> <% end %> <% if (@match.status==0) %> <% if (@tournament.players.include?(current_user)) %> <% @match.teams.each do |team| %>
    <% team.users.collect{|u| u.user_name}.each do |k| %>
  1. <%= k %>
  2. <% end %>
<% end %> <% elsif (@tournament.hosts.include?(current_user)) %> <% end %> <% end %> <% unless @match.winner.nil? %>

Winner: <%= @match.winner.users.collect{|u| u.user_name}.join(", ") %>

<% end %>