public
Created

Rake Routes - simple Books-Authors example

  • Download Gist
routes-authors-books.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
C:\Sites\knockout-books>rake routes
root /(.:format) {:controller=>"authors", :actio
n=>"index"}
author_books GET /authors/:author_id/books(.:format) {:action=>"index", :controller=
>"books"}
POST /authors/:author_id/books(.:format) {:action=>"create", :controller
=>"books"}
new_author_book GET /authors/:author_id/books/new(.:format) {:action=>"new", :controller=>"
books"}
edit_author_book GET /authors/:author_id/books/:id/edit(.:format) {:action=>"edit", :controller=>
"books"}
author_book GET /authors/:author_id/books/:id(.:format) {:action=>"show", :controller=>
"books"}
PUT /authors/:author_id/books/:id(.:format) {:action=>"update", :controller
=>"books"}
DELETE /authors/:author_id/books/:id(.:format) {:action=>"destroy", :controlle
r=>"books"}
authors GET /authors(.:format) {:action=>"index", :controller=
>"authors"}
POST /authors(.:format) {:action=>"create", :controller
=>"authors"}
new_author GET /authors/new(.:format) {:action=>"new", :controller=>"
authors"}
edit_author GET /authors/:id/edit(.:format) {:action=>"edit", :controller=>
"authors"}
author GET /authors/:id(.:format) {:action=>"show", :controller=>
"authors"}
PUT /authors/:id(.:format) {:action=>"update", :controller
=>"authors"}
DELETE /authors/:id(.:format) {:action=>"destroy", :controlle
r=>"authors"}
books GET /books(.:format) {:action=>"index", :controller=
>"books"}
POST /books(.:format) {:action=>"create", :controller
=>"books"}
new_book GET /books/new(.:format) {:action=>"new", :controller=>"
books"}
edit_book GET /books/:id/edit(.:format) {:action=>"edit", :controller=>
"books"}
book GET /books/:id(.:format) {:action=>"show", :controller=>
"books"}
PUT /books/:id(.:format) {:action=>"update", :controller
=>"books"}
DELETE /books/:id(.:format) {:action=>"destroy", :controlle
r=>"books"}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.