mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-09 07:39:06 +00:00
Fixed up_matches and results to filter by tournament_id
This commit is contained in:
@@ -8,18 +8,19 @@ class StaticPagesController < ApplicationController
|
|||||||
@tournament = Tournament.find(params[:tournament])
|
@tournament = Tournament.find(params[:tournament])
|
||||||
end
|
end
|
||||||
if @tournament
|
if @tournament
|
||||||
@matches = Weight.where(tournament_id: @tournament.id)
|
@matches = Match.where(tournament_id: @tournament.id)
|
||||||
end
|
end
|
||||||
@matches = Match.where(finished: nil)
|
@matches = @matches.where(finished: nil)
|
||||||
|
|
||||||
end
|
end
|
||||||
def results
|
def results
|
||||||
if params[:tournament]
|
if params[:tournament]
|
||||||
@tournament = Tournament.find(params[:tournament])
|
@tournament = Tournament.find(params[:tournament])
|
||||||
end
|
end
|
||||||
if @tournament
|
if @tournament
|
||||||
@matches = Weight.where(tournament_id: @tournament.id)
|
@matches = Match.where(tournament_id: @tournament.id)
|
||||||
end
|
end
|
||||||
@matches = Match.where(finished: 1)
|
@matches = @matches.where(finished: 1)
|
||||||
|
|
||||||
end
|
end
|
||||||
def brackets
|
def brackets
|
||||||
|
|||||||
Reference in New Issue
Block a user