Use deliver_later in devise

Do not send devise mails directly in the request but through the
delayed jobs.
This commit is contained in:
Henne Vogelsang 2019-01-29 23:20:22 +01:00
parent 0f5181ccf4
commit 334f84179f
2 changed files with 6 additions and 2 deletions

View file

@ -70,7 +70,7 @@ module Admin
if @booth.save
if @conference.email_settings.send_on_booths_acceptance
Mailbot.conference_booths_acceptance_mail(@booth).deliver
Mailbot.conference_booths_acceptance_mail(@booth).deliver_later
end
redirect_to admin_conference_booths_path(conference_id: @conference.short_title),
notice: 'Booth successfully accepted!'
@ -92,7 +92,7 @@ module Admin
@booth.reject!
if @booth.save
Mailbot.conference_booths_rejection_mail(@booth).deliver
Mailbot.conference_booths_rejection_mail(@booth).deliver_later
redirect_to admin_conference_booths_path(conference_id: @conference.short_title),
notice: 'Booth successfully rejected.'
else