rails nested routes code example
Example 1: rails resources
get '/patients/:id', to: 'patients#show'
# url: your_site/patients/12
Example 2: how to generate a controller in a nested route rails
rails g controller api/v1/reviews
get '/patients/:id', to: 'patients#show'
# url: your_site/patients/12
rails g controller api/v1/reviews