From 47bb545740937d50b72e0d1c420fcba4e64d6760 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 30 Apr 2014 15:38:26 -0400 Subject: Add #owned_by? to the models that didn't have it (when appropriate) --- app/views/matches/index.html.erb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/views/matches/index.html.erb') diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index e0e69b5..df2c426 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -20,8 +20,7 @@ <%= (match.winner.nil? ? "-" : "Team #{match.winner.id}") %> <%= link_to "See Match", tournament_match_path(@tournament, match) %> - <%# NOTE: - fix this permission, if split up by match, this does not work %> - <% if @tournament.check_permission(current_user, :edit) %> + <% if match.check_permission(current_user, :edit) %> <%= form_tag(tournament_match_path(@tournament, match), method: "put") do %> <% @startable = (match.status == 1) and (match.teams.count >= @tournament.min_teams_per_match) %> -- cgit v1.2.3