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

Refactored match winner and wrestlers matches and fixed slow tests.

This commit is contained in:
2025-04-25 15:59:35 -04:00
parent 3e4317dbc5
commit 1fcaec876f
20 changed files with 147 additions and 116 deletions

View File

@@ -86,7 +86,11 @@ class WrestlersController < ApplicationController
private
def set_wrestler
@wrestler = Wrestler.includes(:school, :weight, :tournament, :matches).find_by(id: params[:id])
@wrestler = Wrestler.includes(:school, :weight, :tournament, :matches_as_w1, :matches_as_w2).find_by(id: params[:id])
if @wrestler.nil?
redirect_to root_path, alert: "Wrestler not found"
end
end
def wrestler_params