From 4b76651ab6aa295eb9f2f9b7787f8d0fd612526c Mon Sep 17 00:00:00 2001 From: guntasgrewal Date: Mon, 7 Apr 2014 02:08:30 -0400 Subject: fix bugs --- app/views/matches/index.html.erb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 1941179..5a18109 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -4,26 +4,25 @@ - + - <% @tournament.matches.each do |match| %> + <% @tournament.matches.order(:id).reverse.each do |match| %> - - + + -- cgit v1.2.3-54-g00ecf
Status NameStatus Winner
<%= match.status %><%= match.id%> <%= 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") %> + <%= submit_tag("Start Match", :dissabled => match.teams.count < @tournament.min_teams_per_match) %> <% end %> <% end %>