1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Do not show matches with a BYE on the upcoming matches on the bout board. Those matches are filtered out on the next available match logic for the mats.

This commit is contained in:
2025-01-07 08:18:45 -05:00
parent bb3b05ee81
commit 6adcc709e7

View File

@@ -191,7 +191,11 @@ class TournamentsController < ApplicationController
def up_matches
@matches = @tournament.matches.where("mat_id is NULL and (finished <> ? or finished is NULL)",1).order('bout_number ASC').limit(10).includes(:wrestlers)
@matches = @tournament.matches
.where("mat_id is NULL and (finished <> ? or finished is NULL)",1)
.where.not(loser1_name: "BYE").where.not(loser2_name: "BYE")
.order('bout_number ASC')
.limit(10).includes(:wrestlers)
@mats = @tournament.mats.includes(:matches)
end