From 624069d58a2c4b535140422cc90cd5347f18cd4f Mon Sep 17 00:00:00 2001 From: Pablo Torres Date: Sun, 2 Dec 2012 15:14:08 -0500 Subject: Move note to a meaningful section in the guides [ci skip] --- guides/source/routing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/source/routing.md b/guides/source/routing.md index 81fcee23b5..2df83be650 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -99,6 +99,8 @@ creates seven different routes in your application, all mapping to the `Photos` | PATCH/PUT | /photos/:id | update | update a specific photo | | DELETE | /photos/:id | destroy | delete a specific photo | +NOTE: Because the router uses the HTTP verb and URL to match inbound requests, four URLs map to seven different actions. + NOTE: Rails routes are matched in the order they are specified, so if you have a `resources :photos` above a `get 'photos/poll'` the `show` action's route for the `resources` line will be matched before the `get` line. To fix this, move the `get` line **above** the `resources` line so that it is matched first. ### Paths and URLs @@ -112,8 +114,6 @@ Creating a resourceful route will also expose a number of helpers to the control Each of these helpers has a corresponding `_url` helper (such as `photos_url`) which returns the same path prefixed with the current host, port and path prefix. -NOTE: Because the router uses the HTTP verb and URL to match inbound requests, four URLs map to seven different actions. - ### Defining Multiple Resources at the Same Time If you need to create routes for more than one resource, you can save a bit of typing by defining them all with a single call to `resources`: -- cgit v1.2.3