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

Rails says I am using MATCH instead of GET in my routes with contact_us #36

Closed newmanships closed 10 years ago

newmanships commented 10 years ago

Receive the following error:

/home/action/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:191:in normalize_conditions!': You should not use thematchme thod in your router without specifying an HTTP method. (RuntimeError) If you want to expose your action to both GET and POST, addvia: [:get, :post]option. If you want to expose your action to GET, useget` in the router:
Instead of: match "controller#action"
Do: get "controller#action"

There is not a single MATCH in my routes file so I'm not entirely sure what is the problem. Have removed the gem and reinstalled it. Using ruby 2.0 and rails 4+. Not really sure what to do here.

JDutil commented 10 years ago

Are you using the latest version of the gem? There are no matches left in this gem anymore so make sure your on 0.5.1. You could also change to using as git repo rather than tagged version if you continue having problems:

gem 'contact_us', github: 'jdutil/contact_us'
newmanships commented 10 years ago

Ah-ha! I had this in my Gemfile:

gem 'contact_us', '~> 0.4.0'

from the installation instructions. I feel dumb. Thank you :)

JDutil commented 10 years ago

Updated README with latest version #. Thanks for pointing that out.