diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2010-12-29 10:54:42 +1000 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2010-12-29 10:57:59 +1000 |
commit | 60447d8b00c5181d2988c15c3d7f6ac3081fd04d (patch) | |
tree | d45867fb25ebacb8f753b0c1fb46ee5187399683 /railties/guides/source/routing.textile | |
parent | dd166c60c48e4d644a627a548fdd9087d3f2aeec (diff) | |
download | rails-60447d8b00c5181d2988c15c3d7f6ac3081fd04d.tar.gz rails-60447d8b00c5181d2988c15c3d7f6ac3081fd04d.tar.bz2 rails-60447d8b00c5181d2988c15c3d7f6ac3081fd04d.zip |
Routing guide: mention that routes are matched from the top down in a note.
Diffstat (limited to 'railties/guides/source/routing.textile')
-rw-r--r-- | railties/guides/source/routing.textile | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile index 32346e8f2b..15b26d8f9e 100644 --- a/railties/guides/source/routing.textile +++ b/railties/guides/source/routing.textile @@ -85,6 +85,9 @@ creates seven different routes in your application, all mapping to the +Photos+ |PUT |/photos/:id |update |update a specific photo | |DELETE |/photos/:id |destroy |delete a specific photo | + +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. + h4. Paths and URLs Creating a resourceful route will also expose a number of helpers to the controllers in your application. In the case of +resources :photos+: |