Slide 28
Slide 28 text
Jets.application.routes.draw do
get "posts", to: "posts#index"
get “posts/new", to: "posts#new"
get “posts/:id", to: "posts#show"
post "posts", to: "posts#create"
get "posts/:id/edit", to: "posts#edit"
put "posts", to: "posts#update"
delete “posts", to: "posts#delete"
# expands to the RESTful routes above
resources :posts
# GET, POST, PUT, etc request all work
any "posts/hot", to: “posts#hot”
…
end