Use deliver_later in devise
Do not send devise mails directly in the request but through the delayed jobs.
This commit is contained in:
parent
0f5181ccf4
commit
334f84179f
2 changed files with 6 additions and 2 deletions
|
|
@ -287,4 +287,8 @@ class User < ApplicationRecord
|
|||
errors.add(:biography, 'is limited to 150 words.') if biography.split.length > 150
|
||||
end
|
||||
end
|
||||
|
||||
def send_devise_notification(notification, *args)
|
||||
devise_mailer.send(notification, self, *args).deliver_later
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue