Question

How would i go about routing the default page in my rails application to :

http://localhost:3000/pages/1

at the moment in my routes file i have:-

root :to => 'pages#show'
Was it helpful?

Solution

Just add the id param like:

root :to => 'pages#show', :id => 1
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top