Add email for proposal submission

This commit is contained in:
Stella Rouzi 2018-08-22 16:08:39 +03:00 committed by Henne Vogelsang
parent dfe0b8188e
commit da91ff8371
6 changed files with 34 additions and 2 deletions

View file

@ -62,6 +62,7 @@ class ProposalsController < ApplicationController
if @event.save
ahoy.track 'Event submission', title: 'New submission'
Mailbot.submitted_proposal_mail(@event).deliver_later if @conference.email_settings.send_on_submitted_proposal
redirect_to conference_program_proposals_path(@conference.short_title), notice: 'Proposal was successfully submitted.'
else
flash.now[:error] = "Could not submit proposal: #{@event.errors.full_messages.join(', ')}"