Merge pull request #2055 from betagouv/fix-double-confirmation

Fix double confirmation
This commit is contained in:
Frederic Merizen 2018-06-06 18:01:50 +02:00 committed by GitHub
commit ead4a6a2fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -21,7 +21,8 @@ class Administration < ApplicationRecord
administrateur.invite!(id)
User.create({
email: email,
password: password
password: password,
confirmed_at: DateTime.now
})
end