Skip to content

Instantly share code, notes, and snippets.

@kevinvangelder
Created June 7, 2013 16:49
Show Gist options
  • Save kevinvangelder/5730658 to your computer and use it in GitHub Desktop.
Save kevinvangelder/5730658 to your computer and use it in GitHub Desktop.
def contact
if params[:contact]
@contact = Contact.new(params[:contact])
if @contact.save
if ContactMailer.contact_email(contact).deliver()
@contact.sent = true
@contact.save
end
redirect_to contact_thank_you_url
end
end
@page_title = "Contact Us"
breadcrumbs.add 'Contact Us', contact_url
@contact ||= Contact.new
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment