Skip to content

Commit

Permalink
Routing guide: mention that routes are matched from the top down in a…
Browse files Browse the repository at this point in the history
… note.
  • Loading branch information
radar committed Dec 29, 2010
1 parent dd166c6 commit 60447d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions railties/guides/source/routing.textile
Original file line number Diff line number Diff line change
Expand Up @@ -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+:
Expand Down

0 comments on commit 60447d8

Please sign in to comment.