mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-09 23:44:52 +00:00
including mats on tournament query
This commit is contained in:
@@ -6,7 +6,7 @@ class StaticPagesController < ApplicationController
|
|||||||
end
|
end
|
||||||
def up_matches
|
def up_matches
|
||||||
if params[:tournament]
|
if params[:tournament]
|
||||||
@tournament = Tournament.where(:id => params[:tournament]).includes(:matches).first
|
@tournament = Tournament.where(:id => params[:tournament]).includes(:matches,:mats).first
|
||||||
end
|
end
|
||||||
if @tournament
|
if @tournament
|
||||||
@matches = @tournament.matches.where(mat_id: nil).order('bout_number ASC').limit(10).includes(:wrestlers)
|
@matches = @tournament.matches.where(mat_id: nil).order('bout_number ASC').limit(10).includes(:wrestlers)
|
||||||
|
|||||||
Reference in New Issue
Block a user