A Rails 3+ Engine providing a basic contact form.
There is also a demo application showing how the ContactUs form works:
Contact Us requires the Formtastic Gem. Read more about Formtastic @ https://github.com/justinfrench/formtastic
I used Formtastic as a dependency to keep things simple, and hook into your apps custom Formtastic stylesheets. People have different tastes for their html / css markup, and I find Formtastic to be a great standardized and reusable way to build forms across apps.
If you don't want to have Formtastic as a dependency there is a fork of this project without it here.
Gemfile, add the following dependencies:
gem 'contact_us', '~> 0.1.5'
$ bundle $ bundle exec rake contact_us:install
config.mailer_to = "email@example.com"
Change to the email address you would like to receive the form submissions at for example:
config.mailer_to = "firstname.lastname@example.org"
The generator copies the view files to
app/views/contact_us, and you can customize them to suit your needs.
You may also update your locales under
config/locales/contact_us.en.yml or create your own. Please feel free to submit your own locales so that other users will hopefully find this gem more useful.
Visit your website and navigate to
/contact_us to see the form in action.
Contact Us has 100% test coverage, and provides simple integration specs you can drop directly into your apps test suite if you use RSpec & Capybara.
Simply copy the
spec/integration/contact_us_lint_spec.rb file, and add it to your integration specs.
Please report any bugs or feature requests to the Github issues page @ https://github.com/jdutil/contact_us/issues
In the spirit of free software, everyone is encouraged to help improve this project.
Here are some ways you can contribute:
- by using prerelease versions
- by reporting bugs
- by suggesting new features
- by translating to a new language
- by writing or editing documentation
- by writing specifications
- by writing code (no patch is too small: fix typos, add comments, clean up inconsistent whitespace)
- by refactoring code
- by resolving issues
- by reviewing patches
- Add new language translations
- Make requested configurations in branches, and document how to reference within your Gemfile rather than the version. Configurations todo: with name, with subject, with name & subject
Copyright (c) 2011 Jeff Dutil, released under the MIT license.