Rails routes for article/234 and article/index -


i need setup following urls:

/article (article#index) /articles/1234  ( article#show id 1234) /articles/new  (article#new) 

can define using:

resources :article   ??? end 

if closely @ question, appears want index @ /article instead of default rails rest convention, /articles

it doesn't make apparent sense model routes way, if surely want do, add 1 more route line in addition call resources

resources :articles match '/article', :to => 'articles#index' 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -