From 0e9a01611097f8b52f5dd1110562945c3cb48ea7 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Mon, 6 Feb 2023 10:21:17 +0000 Subject: [PATCH] feat: fix initial confirmation sent behaviour --- app/mailers/devise_notify_mailer.rb | 1 + app/models/user.rb | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mailers/devise_notify_mailer.rb b/app/mailers/devise_notify_mailer.rb index 827e81b56..827ba9192 100644 --- a/app/mailers/devise_notify_mailer.rb +++ b/app/mailers/devise_notify_mailer.rb @@ -41,6 +41,7 @@ class DeviseNotifyMailer < Devise::Mailer send_confirmation_email(record.unconfirmed_email, record, token, username) end send_confirmation_email(record.email, record, token, username) + record.update!(initial_confirmation_sent: true) end def intercept_send?(email) diff --git a/app/models/user.rb b/app/models/user.rb index cee5f9550..a9470a64e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -113,7 +113,6 @@ class User < ApplicationRecord RECONFIRMABLE_TEMPLATE_ID else CONFIRMABLE_TEMPLATE_ID - update!(initial_confirmation_sent: true) end end