Contact Form is a Ruby gem for adding a contact form to a Rails project.
Add this line to your application's Gemfile:
gem "contact-form", github: "codelation/contact-form"
Install the Contact Form gem with Bundler:
bundle install
Install the controller, views, and database migrations:
rails g contact_form:install
rake db:migrate
Be default, the available fields are: first_name
, last_name
, email
, phone_number
, additional
, and message
. This is ment to be flexible for most situations. If you do not want to separate first and last names, you could use just first_name
. The additional
field is meant to be used to hold any other information like a company name or organization name.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request