Add admin action to regenerate QR codes

This commit is contained in:
sto
2025-11-21 10:53:23 +01:00
parent db6f732e63
commit ae3c7c73e1
5 changed files with 20 additions and 1 deletions

View File

@@ -73,6 +73,15 @@ class UsersController < ApplicationController
redirect_to users_path, notice: "Updated contestants: #{updated}/#{total}"
end
def regenerate_qrcodes
authorize :user
Contestant.all.each do |contestant|
contestant.regenerate_qrcode
contestant.save
end
end
private
def set_user