Ruby Routes

[Solved] Ruby Routes | Ruby - Code Explorer | yomemimo.com
Question : ruby routes

Answered by : daichi-nagata

get '/patients/:id', to: 'patients#show'
get '/patients/:id', to: 'patients#show', as: 'patient'
resources :brands, only: [:index, :show] do resources :products, only: [:index, :show]
end
resource :basket, only: [:show, :update, :destroy]
resolve("Basket") { route_for(:basket) }
root to: 'pages#main'
root 'pages#main' # 上の省略形

Source : https://railsguides.jp/routing.html | Last Update : Sun, 10 Jul 22

Answers related to ruby routes

Code Explorer Popular Question For Ruby