diff --git a/app/controllers/admin/gestionnaires_controller.rb b/app/controllers/admin/gestionnaires_controller.rb index 831dd6f38..f77c49fc0 100644 --- a/app/controllers/admin/gestionnaires_controller.rb +++ b/app/controllers/admin/gestionnaires_controller.rb @@ -52,7 +52,7 @@ class Admin::GestionnairesController < AdminController if User.exists?(email: @gestionnaire.email) GestionnaireMailer.user_to_gestionnaire(@gestionnaire.email).deliver_later else - User.create(email: email, password: password) + User.create(email: email, password: password, confirmed_at: DateTime.now) end flash.notice = 'Accompagnateur ajouté' else diff --git a/app/models/administration.rb b/app/models/administration.rb index 75b83697c..ee601caa0 100644 --- a/app/models/administration.rb +++ b/app/models/administration.rb @@ -21,7 +21,8 @@ class Administration < ApplicationRecord administrateur.invite!(id) User.create({ email: email, - password: password + password: password, + confirmed_at: DateTime.now }) end