samedi 5 novembre 2016

Rails Routs Format

Need to generate the following routes as

/:owner_name/articles
/:articles/:id
/owners
/:owner_name

I have tried as,

resources :owners, param: :owner_name, path: '', shallow_path: "", only: [:index, :show] do
resources :articles, only: [:index,:show]
end 

But cant able to reproduce the same

Aucun commentaire:

Enregistrer un commentaire