demarches-normaliennes/lib/tasks/deployment/20190809074534_populate_user_administrateur_ids.rake
2019-08-14 15:06:15 +02:00

10 lines
361 B
Ruby

namespace :after_party do
desc 'Deployment task: populate_user_administrateur_ids'
task populate_user_administrateur_ids: :environment do
Administrateur.find_each do |administrateur|
User.where(email: administrateur.email).update(administrateur_id: administrateur.id)
end
AfterParty::TaskRecord.create version: '20190809074534'
end
end