mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-08 15:29:20 +00:00
Fixed pooladvance and updated views for when tournament ends
This commit is contained in:
@@ -7,9 +7,11 @@ class MatsController < ApplicationController
|
||||
# GET /mats/1.json
|
||||
def show
|
||||
@match = @mat.unfinishedMatches.first
|
||||
@w1 = @match.wrestler1
|
||||
@w2 = @match.wrestler2
|
||||
@wrestlers = [@w1,@w2]
|
||||
if @match
|
||||
@w1 = @match.wrestler1
|
||||
@w2 = @match.wrestler2
|
||||
@wrestlers = [@w1,@w2]
|
||||
end
|
||||
end
|
||||
|
||||
# GET /mats/new
|
||||
|
||||
@@ -148,9 +148,9 @@ class TournamentsController < ApplicationController
|
||||
|
||||
def check_for_matches
|
||||
if @tournament
|
||||
if @tournament.matches.empty?
|
||||
redirect_to "/tournaments/#{@tournament.id}/no_matches"
|
||||
end
|
||||
if @tournament.matches.empty?
|
||||
redirect_to "/tournaments/#{@tournament.id}/no_matches"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user