diff options
author | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-12-09 01:38:17 +0100 |
---|---|---|
committer | Hongli Lai (Phusion) <hongli@phusion.nl> | 2008-12-09 01:38:17 +0100 |
commit | 13c6c3cfc59ff0b400b294dce15f32752b0fb5f5 (patch) | |
tree | 052ac9c8f4adb91a4b32e3b2a97b1bc6bdace2e6 /railties/doc/guides/source/routing_outside_in.txt | |
parent | ccb96f2297e8783165cba764e9b5d51e1a15ff87 (diff) | |
parent | 4e60eebae05aeec65e4894e3901c9d61c9b32910 (diff) | |
download | rails-13c6c3cfc59ff0b400b294dce15f32752b0fb5f5.tar.gz rails-13c6c3cfc59ff0b400b294dce15f32752b0fb5f5.tar.bz2 rails-13c6c3cfc59ff0b400b294dce15f32752b0fb5f5.zip |
Merge commit 'origin/master' into savepoints
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 ------------------------------------------------------- |