diff options
author | Pablo Torres <tn.pablo@gmail.com> | 2012-12-02 15:14:08 -0500 |
---|---|---|
committer | Pablo Torres <tn.pablo@gmail.com> | 2012-12-02 16:53:18 -0500 |
commit | 624069d58a2c4b535140422cc90cd5347f18cd4f (patch) | |
tree | 8d2db0ab3730f3251c9c8ef25fcbc6ecdfc61a93 | |
parent | d21a46823142f62ff744e505b7d6162ffad769c4 (diff) | |
download | rails-624069d58a2c4b535140422cc90cd5347f18cd4f.tar.gz rails-624069d58a2c4b535140422cc90cd5347f18cd4f.tar.bz2 rails-624069d58a2c4b535140422cc90cd5347f18cd4f.zip |
Move note to a meaningful section in the guides [ci skip]
-rw-r--r-- | guides/source/routing.md | 4 |
1 files 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`: |