README.md in contact_us-0.3.0 vs README.md in contact_us-0.4.0.beta
- old
+ new
@@ -10,22 +10,22 @@
* [View Demo Form In Action](http://contact-us-demo.heroku.com)
* [View Demo Applications Source Code](http://github.com/jdutil/contact_us_demo)
## REQUIREMENTS
-Contact Us requires the Formtastic Gem. Read more about Formtastic @ https://github.com/justinfrench/formtastic
+Contact Us requires:
-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.
+* Ruby >= 1.8.7 (will soon only support > 1.9.2)
+* Rails >= 3.0.0
-If you don't want to have Formtastic as a dependency there is a fork of this project without it [here](https://github.com/sch1zo/contact_us).
+It is also recommended to use Formtastic or SimpleForm (see configuration) in order to hook into your apps custom form builders.
## INSTALLATION
In your `Gemfile`, add the following dependencies:
- gem 'contact_us', '~> 0.3.0'
+ gem 'contact_us', '~> 0.4.0.beta'
From `Rails.root` run:
$ bundle
$ bundle exec rake contact_us:install
@@ -41,10 +41,34 @@
By default the emails from field will be the email entered by the user to easily reply, but this may not be allowed if your required to verify your sending email addresses.
You may also specify an email address for the notification emails from field:
config.mailer_from = "dontreply@yourdomain.com"
+## CONFIGURATION
+
+The generator copies the view files to `app/views/contact_us`, and you can customize them to suit your needs. If you would like to add a name or subject field to the form you may simply
+set the options to true within the contact_us initializer located at `config/initializers/contact_us.rb`:
+
+ config.require_name = true
+ config.require_subject = true
+
+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.
+
+### Formtastic
+
+In order to use a Formtastic compatible template to hook into your custom form styles configure `config/initializers/contact_us.rb`:
+
+ config.form_gem = 'formtastic'
+
+* By default the HTML should match that produced by Formtastic, but to ensure it is up to date you should set Formtastic.
+
+### SimpleForm
+
+In order to use a SimpleForm compatible template to hook into your custom form styles configure `config/initializers/contact_us.rb`:
+
+ config.form_gem = 'simple_form'
+
## UPGRADING
When upgrading from 0.1.x to 0.2.x you should rerun the install generator to install the new settings, views, and locale updates:
$ bundle exec rake contact_us:install
@@ -52,20 +76,10 @@
Or you may run the generators for each specific component you would like to update, which is quite useful when upgrading during patch releases for example from 0.2.0 to 0.2.1:
$ bundle exec rake contact_us:copy_locales
$ bundle exec rake contact_us:copy_views
-## CONFIGURATION
-
-The generator copies the view files to `app/views/contact_us`, and you can customize them to suit your needs. If you would like to add a name or subject field to the form you may simply
-set the options to true within the contact_us initializer located at `config/initializers/contact_us.rb`:
-
- config.require_name = true
- config.require_subject = true
-
-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.
-
## USAGE
Visit your website and navigate to `/contact-us` to see the form in action.
## INTEGRATION TESTS
@@ -95,8 +109,9 @@
* by resolving [issues](https://github.com/jdutil/contact_us/issues)
* by reviewing patches
## TODO
-* Add new language translations
+* Add new language translations.
+* Stop copying views/locales by default.
Copyright (c) 2011 Jeff Dutil, released under the [MIT license](https://github.com/jdutil/contact_us/tree/master/MIT-LICENSE).