In each of these cases, the named routes remain the same as if you did not use +scope+. In the last case, the following paths map to +PostsController+:
In each of these cases, the named routes remain the same as if you did not use +scope+. In the last case, the following paths map to +PostsController+:
@@ -589,7 +589,7 @@ The +:controller+ option lets you explicitly specify a controller to use for the
...
@@ -589,7 +589,7 @@ The +:controller+ option lets you explicitly specify a controller to use for the
resources :photos, :controller => "images"
resources :photos, :controller => "images"
</ruby>
</ruby>
will recognize incoming paths beginning with +/photo+ but route to the +Images+ controller:
will recognize incoming paths beginning with +/photos+ but route to the +Images+ controller:
|_. Verb |_.Path |_.action |
|_. Verb |_.Path |_.action |
|GET |/photos |index |
|GET |/photos |index |
...
@@ -788,7 +788,7 @@ TIP: You'll find that the output from +rake routes+ is much more readable if you
...
@@ -788,7 +788,7 @@ TIP: You'll find that the output from +rake routes+ is much more readable if you
h4. Testing Routes
h4. Testing Routes
Routes should be included in your testing strategy (just like the rest of your application). Rails offers three "built-in assertions":http://api.rubyonrails.org/classes/ActionController/Assertions/RoutingAssertions.html designed to make testing routes simpler:
Routes should be included in your testing strategy (just like the rest of your application). Rails offers three "built-in assertions":http://api.rubyonrails.org/classes/ActionDispatch/Assertions/RoutingAssertions.html designed to make testing routes simpler: