From f69fcc28596700c1a875068b7cb616d6eb40e6df Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 7 Mar 2014 01:25:12 -0500 Subject: It is 1:30 AM --- app/views/matches/show.html.erb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'app/views/matches') diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb index f5a3686..3a7e7a6 100644 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -8,11 +8,11 @@ <%= @match.name %>

-<% if @tournament.hosts.include?(current_user) %> - <%= form_for(@match, method: "put") do |f| %> +<% if (@tournament.hosts.include?(current_user) and @match.winner.nil?) %> + <%= form_for([@tournament, @match], method: "put") do |f| %> @@ -20,15 +20,11 @@ <% end %> <% end %> -<%= link_to 'Edit', edit_tournament_match_path(@tournament, @match) %> | -<%= link_to 'Back', tournament_matches_path %> - <% unless @match.winner.nil? %>

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

<% end %> -<%= link_to 'Edit', edit_match_path(@match) %> | -<%= link_to 'Back', matches_path %> +<%= link_to 'Back', tournament_matches_path %> -- cgit v1.2.3-54-g00ecf