Skip to content

Commit

Permalink
Refactor contact form to call deliver.
Browse files Browse the repository at this point in the history
the contact form is a MailForm object and doesn't support deliver_now.
  • Loading branch information
jcoyne committed Jun 16, 2016
1 parent 2868d36 commit 5137a5c
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -8,7 +8,7 @@ def create
@contact_form = ContactForm.new(params[:contact_form])
@contact_form.request = request
# not spam and a valid form
if @contact_form.respond_to?(:deliver_now) ? @contact_form.deliver_now : @contact_form.deliver
if @contact_form.deliver
flash.now[:notice] = 'Thank you for your message!'
after_deliver
@contact_form = ContactForm.new
Expand Down

0 comments on commit 5137a5c

Please sign in to comment.