Setup SimpleForm with Zurb Foundation

One of the requirements for our tutorial application is a contact form.
We could set up styling for the form when we implement the contact page,
but it is convenient to set up form styling now, as we would if we were
adding multiple forms to the site.

Rails provides a set of view helpers for forms. They are described in
the RailsGuides: Rails Form Helpers document. But, as you’ve learned,
Rails has more than one stack, and most developers use an alternative
set of form helpers named SimpleForm, provided by the SimpleForm gem.
The SimpleForm helpers are more powerful, easier to use, and offer an
option for styling with Zurb Foundation.

In your Gemfile, you’ve already added:

gem 'simple_form'

and previously run $ bundle install.

Run the generator to install SimpleForm with a Zurb Foundation option:

$ rails generate simple_form:install --foundation

which installs several configuration files:

config/initializers/simple_form.rb
config/initializers/simple_form_foundation.rb
config/locales/simple_form.en.yml
lib/templates/erb/scaffold/_form.html.erb

Here the SimpleForm gem uses the rails generate command to create files
for initialization and localization (language translation). SimpleForm
can be customized with settings in the initialization file. We’ll use
the defaults.