JDutil / contact_us

Gem providing simple Contact Form functionality with a Rails 3+ Engine.
http://contact-us-demo.herokuapp.com
MIT License
135 stars 57 forks source link

can not submit a email #40

Closed hoasung01 closed 10 years ago

hoasung01 commented 10 years ago

I fill in a form then I press "Submit" then it throws this error No route matches [GET] "/contact-success"

Thanks in advance.

JDutil commented 10 years ago

What version of the gem and what version of rails are you running?

hoasung01 commented 10 years ago

Rails 3.2.16 contact_us (0.5.0)

JDutil commented 10 years ago

Please bump to 0.5.1 I think 0.5.0 should have been yanked.

JDutil commented 10 years ago

Oh wait I think you followed some of the configuration instructions that were meant to just be examples... This gem does not provide a /contact-success page. The success-redirect configuration option should be set to where you want to send people, and it should be nil by default: https://github.com/JDutil/contact_us#configuration

JDutil commented 10 years ago

Actually I lied again it's set to '/' by default: https://github.com/JDutil/contact_us/blob/master/lib/templates/contact_us.rb#L28

hoasung01 commented 10 years ago

ah, so I will create new contact-success page? Thanks so much JDutil

JDutil commented 10 years ago

Yea you can redirect the person to any page you want by changing that configuration option under config/intializers/contact_us.rb By default it should be set to: '/' but if you want to make your own custom page or redirect to another page other than home page you just change that option to whatever path you would like it to be.