In my routes.rb, I defined a concern like below:
concern :namespaceable do
resources :comments do
resources :replies
...
Now, I can add this concern to any resources:
resources :groups, concerns: :namespaceable, shallow: true
But how can I add this concern shallowly to the root, so that I can have following routes
- /comments
- /comments/{comment_id}
- /comments/{comment_id}/replies
- /replies/{reply_id}
Thanks a lot!