mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-10 23:53:06 +00:00
Cleaned up a bunch of shit. Depricated model methods and controller methods.
This commit is contained in:
@@ -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]}
|
||||
|
||||
@@ -11,9 +11,8 @@ class TournamentsController < ApplicationController
|
||||
# GET /tournaments/1.json
|
||||
def show
|
||||
@schools = @tournament.schools
|
||||
@weights = @tournament.weights
|
||||
@weights = @tournament.weights.sort_by{|x|[x.max]}
|
||||
@mats = @tournament.mats
|
||||
@weights = @weights.sort_by{|x|[x.max]}
|
||||
end
|
||||
|
||||
# GET /tournaments/new
|
||||
|
||||
Reference in New Issue
Block a user