Skip to content
This repository
Browse code

Routing guide: mention that routes are matched from the top down in a…

… note.
  • Loading branch information...
commit 60447d8b00c5181d2988c15c3d7f6ac3081fd04d 1 parent dd166c6
Ryan Bigg authored December 29, 2010

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  railties/guides/source/routing.textile
3  railties/guides/source/routing.textile
Source Rendered
@@ -85,6 +85,9 @@ creates seven different routes in your application, all mapping to the +Photos+
85 85
 |PUT          |/photos/:id       |update   |update a specific photo                      |
86 86
 |DELETE       |/photos/:id       |destroy  |delete a specific photo                      |
87 87
+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.
88 91
 h4. Paths and URLs
89 92
90 93
 Creating a resourceful route will also expose a number of helpers to the controllers in your application. In the case of +resources :photos+:

0 notes on commit 60447d8

Please sign in to comment.
Something went wrong with that request. Please try again.