set path two resources rails routes code example
Example 1: get and to rails
@patient = Patient.find(params[:id])
Example 2: rails resources only
resources :controller_name, only: [:create, :new]
@patient = Patient.find(params[:id])
resources :controller_name, only: [:create, :new]