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

Cleaned up a bunch of shit. Depricated model methods and controller methods.

This commit is contained in:
2015-04-15 13:42:12 +00:00
parent 451e6911f8
commit 2b1618c69b
9 changed files with 45 additions and 51 deletions

View File

@@ -6,7 +6,7 @@ class StaticPagesController < ApplicationController
def up_matches
if params[:tournament]
@tournament = Tournament.find(params[:tournament])
end
end
if @tournament
@matches = @tournament.upcomingMatches
end
@@ -15,7 +15,7 @@ class StaticPagesController < ApplicationController
def team_scores
if params[:tournament]
@tournament = Tournament.find(params[:tournament])
end
end
if @tournament
@schools = School.where(tournament_id: @tournament.id)
@schools.sort_by{|x|[x.score]}
@@ -25,7 +25,7 @@ class StaticPagesController < ApplicationController
def results
if params[:tournament]
@tournament = Tournament.find(params[:tournament])
end
end
if @tournament
@matches = Match.where(tournament_id: @tournament.id)
end
@@ -51,7 +51,7 @@ class StaticPagesController < ApplicationController
def weights
if params[:tournament]
@tournament = Tournament.find(params[:tournament])
end
end
if @tournament
@weights = Weight.where(tournament_id: @tournament.id)
@weights = @weights.sort_by{|x|[x.max]}