Add Bullet gem for dev & fix N+1 queries issues for core index actions
This commit is contained in:
@@ -12,7 +12,7 @@ class ContestantsController < ApplicationController
|
||||
def index
|
||||
authorize @contest
|
||||
|
||||
@contestants = @contest.contestants.sort_by { |contestant| contestant.name }
|
||||
@contestants = @contest.contestants.includes([ :completions, :offline ]).sort_by { |contestant| contestant.name }
|
||||
filter_contestants_per_category
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user