ruby on rails resource with variable code example
Example 1: rails resources only
resources :controller_name, only: [:create, :new]
Example 2: rails resources
get '/patients/:id', to: 'patients#show'
# url: your_site/patients/12
resources :controller_name, only: [:create, :new]
get '/patients/:id', to: 'patients#show'
# url: your_site/patients/12