JDutil/contact_us

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

Closed this issue · 3 comments

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.

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'

Ah-ha! I had this in my Gemfile:

gem 'contact_us', '~> 0.4.0'

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

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