end of day commit

This commit is contained in:
2015-02-25 18:56:45 +01:00
parent c2435695bf
commit 3da5d8eb41
29 changed files with 132 additions and 27 deletions
@@ -0,0 +1,16 @@
class ContactFormsController < ApplicationController
def create
@contact_form = Cmtool::ContactForm.new(contact_form_params)
if @contact_form.save
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(', ')
end
end
private
def contact_form_params
params.require(:contact_form).permit!
end
end