aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/routing.textile
diff options
context:
space:
mode:
authorErik Michaels-Ober <sferik@gmail.com>2011-07-25 14:13:26 -0700
committerErik Michaels-Ober <sferik@gmail.com>2011-07-25 14:13:26 -0700
commitc17254319b7fadb789cde24d1e72a233a33e4ac7 (patch)
tree6fdffd09f7f900733f3d5a5805545dc0bf5d7ecf /railties/guides/source/routing.textile
parentb9c91426032e110aa60fca563ab513621096289a (diff)
downloadrails-c17254319b7fadb789cde24d1e72a233a33e4ac7.tar.gz
rails-c17254319b7fadb789cde24d1e72a233a33e4ac7.tar.bz2
rails-c17254319b7fadb789cde24d1e72a233a33e4ac7.zip
Add documentation for :format => true
Diffstat (limited to 'railties/guides/source/routing.textile')
-rw-r--r--railties/guides/source/routing.textile6
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index 68fb22f5d8..99dd9a1cd2 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -569,6 +569,12 @@ NOTE: By requesting +"/foo/bar.json"+, your +params[:pages]+ will be equals to +
match '*pages' => 'pages#show', :format => false
</ruby>
+NOTE: If you want to make the format segment mandatory, so it cannot be omitted, you can supply +:format => true+ like this:
+
+<ruby>
+match '*pages' => 'pages#show', :format => true
+</ruby>
+
h4. Redirection
You can redirect any path to another path using the +redirect+ helper in your router: