Created
June 26, 2019 14:37
-
-
Save gourshete/6909e997f7d11ed2b9ddb4b046d50c58 to your computer and use it in GitHub Desktop.
Expanded routes for resource books
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # config/routes.rb | |
| Rails.application.routes.draw do | |
| # resources :books becomes... | |
| get '/books' => 'books#index' | |
| get '/books/new' => 'books#new' | |
| post '/books' => 'books#create' | |
| get '/books/:id' => 'books#show' | |
| get '/books/:id/edit' => 'books#edit' | |
| put '/books/:id' => 'books#update' | |
| delete '/books/:id' => 'books#destroy' | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment