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

Closed
newmanships opened this Issue Jan 6, 2014 · 3 comments

Projects

None yet

2 participants

@newmanships

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
Owner
JDutil commented Jan 6, 2014

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'
@JDutil JDutil closed this Jan 6, 2014
@newmanships

Ah-ha! I had this in my Gemfile:

gem 'contact_us', '~> 0.4.0'

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

@JDutil JDutil added a commit that referenced this issue Jan 6, 2014
@JDutil Update README. refs #36 b2a1da2
@JDutil
Owner
JDutil commented Jan 6, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment