سؤال

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'
هل كانت مفيدة؟

المحلول

Just add the id param like:

root :to => 'pages#show', :id => 1
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top