mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Fixed a couple slow queries
This commit is contained in:
@@ -15,6 +15,10 @@ class ApiController < ApplicationController
|
||||
|
||||
def tournament
|
||||
@tournament = Tournament.where(:id => params[:tournament]).includes(:schools,:weights,:mats,:matches,:user,:wrestlers).first
|
||||
@schools = @tournament.schools.includes(:wrestlers)
|
||||
@weights = @tournament.weights.includes(:wrestlers)
|
||||
@matches = @tournament.matches.includes(:wrestlers,:schools)
|
||||
@mats = @tournament.mats.includes(:matches)
|
||||
end
|
||||
|
||||
def newTournament
|
||||
|
||||
Reference in New Issue
Block a user