Rails Routes: Small => true

I wonder why the my / articles route doesn't work when I apply: underow => true?

routes.rb

resources :users, :shallow => true do resources :articles end 

Also tried the following:

 resources :users do resources :articles, :shallow => true end 

Visiting / articles will not show me all the articles from any user as expected, but I can still visit / articles /: id just fine. Is this expected behavior?

+4
source share
1 answer

The shallow: true parameter does not provide an index resource as documented . Therefore, you will not be able to access only /articles . So yes, this is the expected behavior.

+10
source

All Articles