1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-01 12:15:25 +00:00

Moved team score for faster front page load.

This commit is contained in:
2015-02-06 09:18:04 -05:00
parent 3eff0ed0fa
commit 5b8e90b50a
5 changed files with 35 additions and 2 deletions

View File

@@ -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])