Slide 19
Slide 19 text
# routing.rb
Rails.application.routes.draw do
resources :brands, only: [:index, :show] do
resources :products, only: [:index, :show]
end
resource :basket, only: [:show, :update, :destroy]
resolve("Basket") { route_for(:basket) }
end
methods of the class
ActionDispatch::Routing::Mapper
uses instance_eval to set self
to a mapper instance