Question

By default the resources command generates the url for new action as {model}/new. Sending a path_names = {} hash doesn't change the base {model} according to the documentation. How would I go about routing /submit to posts#new action?

Was it helpful?

Solution

match 'submit' => 'posts#new'

I hope this is what you are looking for...

You might want to have a look at those two awesome screencasts by Ryan Bates if you wish to understand how it works behind the scene.

routing-walkthrough routing-walkthrough-part-2

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top