Add contact form notification

This commit is contained in:
2015-02-26 05:22:36 +01:00
parent 4283f0313b
commit 9e9a732384
5 changed files with 53 additions and 0 deletions
@@ -2,6 +2,7 @@ class ContactFormsController < ApplicationController
def create
@contact_form = Cmtool::ContactForm.new(contact_form_params)
if @contact_form.save
Notifier.contact_form(@contact_form.id).deliver
redirect_to root_path, notice: t('contact_form.submitted')
else
redirect_to go_to_path('contact', locale: I18n.locale), alert: @contact_form.errors.full_messages.join(', ')