|
|
|
@ -54,13 +54,13 @@ class Competitions::CompetitionTeamsController < Competitions::BaseController
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@count = teams.count
|
|
|
|
|
@teams = paginate(teams.includes(:user, users: :user_extension))
|
|
|
|
|
@teams = paginate(teams.includes(:user, users: { user_extension: :school }))
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def user_competition_teams
|
|
|
|
|
teams = current_competition.competition_teams
|
|
|
|
|
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
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|