rails resources only code example
Example 1: rails resources only
resources :controller_name, only: [:create, :new]
Example 2: resources rails
resources :name_of_your_controller
resources :controller_name, only: [:create, :new]
resources :name_of_your_controller