Skip to content
Browse files

Add documentation for :format => true

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

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