Browse files

Add documentation for :format => true

  • Loading branch information...
sferik committed Jul 25, 2011
1 parent c41ecd7 commit 78d151dbac67afebd73665ffcdef2aa8d8517ae1
Showing with 6 additions and 0 deletions.
  1. +6 −0 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
+NOTE: If you want to make the format segment mandatory, so it cannot be omitted, you can supply +:format => true+ like this:
+match '*pages' => 'pages#show', :format => true
h4. Redirection
You can redirect any path to another path using the +redirect+ helper in your router:

0 comments on commit 78d151d

Please sign in to comment.