Skip to content

Instantly share code, notes, and snippets.

@pwentz
Forked from Carmer/routes_to_route_helpers.md
Created July 13, 2016 16:08
Show Gist options
  • Save pwentz/acd84238fd1ef8ee4c1799e690cfa535 to your computer and use it in GitHub Desktop.
Save pwentz/acd84238fd1ef8ee4c1799e690cfa535 to your computer and use it in GitHub Desktop.

Route Helper Practice

For the following routes, write out the route helper that will correspond with the verb path combination. For example:

get "/artists" => artists_path

post "/artists" => artists_path

Create route helpers for the following:

  • get "/artists"
  • get "/artists/42"
  • get "/artists/42/edit"
  • put "/artists/42"
  • get "/artists/new"
  • post "/artists"
  • delete "/artists/42"
  • get "/stickers"
  • get "/stickers/42"
  • get "/stickers/42/edit"
  • put "/stickers/42"
  • get "/stickers/new"
  • post "/stickers"
  • delete "/stickers/42"
  • get "/albums"
  • get "/albums/42"
  • get "/albums/42/edit"
  • put "/albums/42"
  • get "/albums/new"
  • post "/albums"
  • delete "/albums/42"
  • get "/tracks"
  • get "/tracks/42"
  • get "/tracks/42/edit"
  • put "/tracks/42"
  • get "/tracks/new"
  • post "/tracks"
  • delete "/tracks/42"
  • get "/songs"
  • get "/songs/42"
  • get "/songs/42/edit"
  • put "/songs/42"
  • get "/songs/new"
  • post "/songs"
  • delete "/songs/42"
  • get "/tasks"
  • get "/tasks/42"
  • get "/tasks/42/edit"
  • put "/tasks/42"
  • get "/tasks/new"
  • post "/tasks"
  • delete "/tasks/42"
  • get "/tools"
  • get "/tools/42"
  • get "/tools/42/edit"
  • put "/tools/42"
  • get "/tools/new"
  • post "/tools"
  • delete "/tools/42"
  • get "/items"
  • get "/items/42"
  • get "/items/42/edit"
  • put "/items/42"
  • get "/items/new"
  • post "/items"
  • delete "/items/42"
  • get "/cards"
  • get "/cards/42"
  • get "/cards/42/edit"
  • put "/cards/42"
  • get "/cards/new"
  • post "/cards"
  • delete "/cards/42"
  • get "/pictures"
  • get "/pictures/42"
  • get "/pictures/42/edit"
  • put "/pictures/42"
  • get "/pictures/new"
  • post "/pictures"
  • delete "/pictures/42"
  • get "/hard-candies"
  • get "/hard-candies/42"
  • get "/hard-candies/42/edit"
  • put "/hard-candies/42"
  • get "/hard-candies/new"
  • post "/hard-candies"
  • delete "/hard-candies/42"
  • get "/toys"
  • get "/toys/42"
  • get "/toys/42/edit"
  • put "/toys/42"
  • get "/toys/new"
  • post "/toys"
  • delete "/toys/42"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment