When generating a controller, rails automatically put ‘get controller/action’ at top of routes.rb file for each of the resourceful action (such as index, new, create, edit. etc.). What’s purpose of this ‘get’? Since there is a ‘resources’ for the same model in routes.rb, can we get rid of this ‘get’? Is the ‘get’ needed for ‘put’ custom action in routes.rb?
Thanks so much.
You can safely remove that route.
The proper layout for basic resource routing in Rails 3.1 follows this format:
You can read the full Rails routing guide here: http://guides.rubyonrails.org/routing.html