Use ActiveJob to send conference date update mails

This commit is contained in:
Henne Vogelsang 2016-04-21 15:08:00 +02:00
parent 21280cd9d8
commit e758c30292
3 changed files with 17 additions and 8 deletions

View file

@ -85,7 +85,7 @@ module Admin
send_mail_on_conf_update = @conference.notify_on_dates_changed?
if @conference.update_attributes(conference_params)
Mailbot.conference_date_update_mail(@conference).deliver_later if send_mail_on_conf_update
ConferenceDateUpdateMailJob.perform_later(@conference) if send_mail_on_conf_update
redirect_to edit_admin_conference_path(id: @conference.short_title),
notice: 'Conference was successfully updated.'
else