|
|
@ -54,13 +54,13 @@ class Competitions::CompetitionTeamsController < Competitions::BaseController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
@count = teams.count
|
|
|
|
@count = teams.count
|
|
|
|
@teams = paginate(teams.includes(:user, users: :user_extension))
|
|
|
|
@teams = paginate(teams.includes(:user, users: { user_extension: :school }))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def user_competition_teams
|
|
|
|
def user_competition_teams
|
|
|
|
teams = current_competition.competition_teams
|
|
|
|
teams = current_competition.competition_teams
|
|
|
|
teams = teams.joins(:team_members).where(team_members: { user_id: current_user.id })
|
|
|
|
teams = teams.joins(:team_members).where(team_members: { user_id: current_user.id })
|
|
|
|
@teams = teams.includes(:user, users: :user_extension).to_a
|
|
|
|
@teams = teams.includes(:user, users: { user_extension: :school }).to_a
|
|
|
|
@count = @teams.size
|
|
|
|
@count = @teams.size
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|