dev_auth
p31729568 5 years ago
parent 363ed577e5
commit 4a48ab3932

@ -13,7 +13,7 @@ class Competitions::CertificatesController < Competitions::BaseController
def team def team
team = CompetitionTeam.find(params[:id]) team = CompetitionTeam.find(params[:id])
return render_forbidden unless team.team_members.exists?(user_id: current_user.id) return render_forbidden unless team.team_members.exists?(user_id: current_user.id)
return render_not_found unless team.certificate_exist? return render_not_found unless team.certificate_exists?
prize = team.competition_prize_users.first.competition_prize prize = team.competition_prize_users.first.competition_prize
filename = "#{current_competition.name}-#{prize.name}-#{team.name}.pdf" filename = "#{current_competition.name}-#{prize.name}-#{team.name}.pdf"

Loading…
Cancel
Save