1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-30 19:22:21 +00:00

including mats on tournament query

This commit is contained in:
2015-11-02 11:36:15 -05:00
parent 85dfadf8d2
commit e79482fd07

View File

@@ -6,7 +6,7 @@ class StaticPagesController < ApplicationController
end
def up_matches
if params[:tournament]
@tournament = Tournament.where(:id => params[:tournament]).includes(:matches).first
@tournament = Tournament.where(:id => params[:tournament]).includes(:matches,:mats).first
end
if @tournament
@matches = @tournament.matches.where(mat_id: nil).order('bout_number ASC').limit(10).includes(:wrestlers)