Skip to content
Browse files

Add documentation for :format => true

  • Loading branch information...
1 parent 710c5ea commit 6d4f91621871a23576ec6f343f08fd68dda95e0c @sferik sferik committed with fxn Jul 25, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 railties/guides/source/routing.textile
View
6 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:

0 comments on commit 6d4f916

Please sign in to comment.
Something went wrong with that request. Please try again.