i have following route:
resources :articles, except: [:index] collection 'author/:id/articles' => 'articles#index', as: 'index_articles' end end
this results in:
get /api/v1/articles/:id/author/:id/articles(.:format)
how can turn following?:
get /api/v1/author/:id/articles(.:format)
# config/routes.rb resources :articles, except: [:index] resources :authors, path: "author", only: [] resources :articles, only: :index, on: :member #-> url.com/author/:id/articles end
Comments
Post a Comment