diff --git a/app/controllers/static_pages_controller.rb b/app/controllers/static_pages_controller.rb index 9da4c86..3397830 100644 --- a/app/controllers/static_pages_controller.rb +++ b/app/controllers/static_pages_controller.rb @@ -41,7 +41,7 @@ class StaticPagesController < ApplicationController @weight = Weight.find(params[:weight]) @tournament = Tournament.find(@weight.tournament_id) @matches = @tournament.matches.select{|m| m.weight_id == @weight.id} - @wrestlers = Wrestler.where(weight_id: @weight.id) + @wrestlers = Wrestler.where(weight_id: @weight.id).includes(:weight,:school) if @matches.empty? or @wrestlers.empty? redirect_to "/static_pages/noMatches?tournament=#{@tournament.id}" else