Reputation: 37
On a the beginner course Ruby on Rails 3 Essential Training with Kevin Skoglund, I am asked to add the following line of code into my routes.rb file.match ':controller(/:action(/:id(.:format)))'
and comment out this line get 'demo/index'
. According to the tutorial I should get a routing error but instead I get the following argument error. (You should not use the match
method in your router without specifying an HTTP method. If you want to expose your action to both GET and POST, add via: [:get, :post]
option. If you want to expose your action to GET, use get
in the router: Instead of: match "controller#action" Do: get "controller#action").
Upvotes: 0
Views: 124
Reputation: 294
You are taking a course designed for Rails 3, but are using Rails 4. That is why you are having trouble! match
was changed in Rails 4.
Upvotes: 1