how to assign route to resource in rails code example Example: rails resources only resources :controller_name, only: [:create, :new]