diff options
Diffstat (limited to 'railties/doc/guides/source/routing_outside_in.txt')
-rw-r--r-- | railties/doc/guides/source/routing_outside_in.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/doc/guides/source/routing_outside_in.txt b/railties/doc/guides/source/routing_outside_in.txt index 0f6cd358e2..3f6c80de5c 100644 --- a/railties/doc/guides/source/routing_outside_in.txt +++ b/railties/doc/guides/source/routing_outside_in.txt @@ -424,7 +424,7 @@ In this case, all of the normal routes except the route for +destroy+ (a +DELETE In addition to an action or a list of actions, you can also supply the special symbols +:all+ or +:none+ to the +:only+ and +:except+ options. -TIP: If your application has many RESTful routes, using +:only+ and +:accept+ to generate only the routes that you actually need can cut down on memory use and speed up the routing process. +TIP: If your application has many RESTful routes, using +:only+ and +:except+ to generate only the routes that you actually need can cut down on memory use and speed up the routing process. === Nested Resources @@ -738,7 +738,7 @@ You do not need to explicitly use the +:controller+ and +:action+ symbols within [source, ruby] ------------------------------------------------------- -map.connect 'photo/:id', :controller => 'photos', :action => 'show' +map.connect 'photos/:id', :controller => 'photos', :action => 'show' ------------------------------------------------------- With this route, an incoming URL of +/photos/12+ would be dispatched to the +show+ action within the +Photos+ controller. @@ -747,7 +747,7 @@ You an also define other defaults in a route by supplying a hash for the +:defau [source, ruby] ------------------------------------------------------- -map.connect 'photo/:id', :controller => 'photos', :action => 'show', :defaults => { :format => 'jpg' } +map.connect 'photos/:id', :controller => 'photos', :action => 'show', :defaults => { :format => 'jpg' } ------------------------------------------------------- With this route, an incoming URL of +photos/12+ would be dispatched to the +show+ action within the +Photos+ controller, and +params[:format]+ will be set to +jpg+. @@ -886,7 +886,7 @@ For better readability, you can specify an already-created route in your call to [source, ruby] ------------------------------------------------------- -map.index :controller => "pages", :action => "main" +map.index 'index', :controller => "pages", :action => "main" map.root :index ------------------------------------------------------- |