mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-01 20:25:26 +00:00
Moved team score for faster front page load.
This commit is contained in:
@@ -11,6 +11,17 @@ class StaticPagesController < ApplicationController
|
||||
@matches = @tournament.upcomingMatches
|
||||
end
|
||||
end
|
||||
|
||||
def team_scores
|
||||
if params[:tournament]
|
||||
@tournament = Tournament.find(params[:tournament])
|
||||
end
|
||||
if @tournament
|
||||
@schools = School.where(tournament_id: @tournament.id)
|
||||
@schools.sort_by{|x|[x.score]}
|
||||
end
|
||||
end
|
||||
|
||||
def results
|
||||
if params[:tournament]
|
||||
@tournament = Tournament.find(params[:tournament])
|
||||
|
||||
Reference in New Issue
Block a user