Skip to content

Instantly share code, notes, and snippets.

View LHJE's full-sized avatar
😃
Happy

Luke Hunter James-Erickson LHJE

😃
Happy
View GitHub Profile
@LHJE
LHJE / contact-form.md
Created April 21, 2021 00:07 — forked from stevecondylios/contact-form.md
Tutorial: Create and Deploy a Contact Form to Production in Ruby on Rails 5

Create a Contact Form in Rails 5

This is a complete, step-by-step tutorial showing how to create a fully functional contact form in production in rails 5. Rather than reinvent things, the following borrows from the best available documentation and tutorials (most notably, this tutorial on making a contact form in development). The finished contact form can be viewed here.

This tutorial uses:

  • heroku for deployment,
  • gmail for the mailer, and
  • github for version control

It would be a good idea to create a new gmail account to use for your mailer now, if you haven't already. If you haven't yet got a heroku account and installed the heroku CLI, it would be easiest to do so now.

Rails Step By Step “Guide”

Start a new rails project:

Reference: https://github.com/turingschool-examples/task_manager_rails

This will start a new Rails App with postgresql as database and skip the usage of Spring and Turbolinks (method used in task_manager):

rails new task_manager -T -d="postgresql" --skip-spring --skip-turbolinks