diff --git a/app/controllers/admin/booths_controller.rb b/app/controllers/admin/booths_controller.rb index 7f46c2bd..b39a2df4 100644 --- a/app/controllers/admin/booths_controller.rb +++ b/app/controllers/admin/booths_controller.rb @@ -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 diff --git a/app/models/user.rb b/app/models/user.rb index 12d58c54..bc71f61f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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