Use ActiveJob to send schedule update mails

This commit is contained in:
Henne Vogelsang 2016-04-21 16:16:16 +02:00
parent 2ea7bda639
commit 82e356dde0
3 changed files with 17 additions and 8 deletions

View file

@ -14,7 +14,7 @@ module Admin
send_mail_on_schedule_public = @program.notify_on_schedule_public?
if @program.update_attributes(program_params)
Mailbot.send_on_schedule_public(@conference).deliver_later if send_mail_on_schedule_public
ConferenceScheduleUpdateMailJob.perform_later(@conference) if send_mail_on_schedule_public
redirect_to admin_conference_program_path(@conference.short_title),
notice: 'The program was successfully updated.'
else