Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add documentation for :format => true

  • Loading branch information...
commit 78d151dbac67afebd73665ffcdef2aa8d8517ae1 1 parent c41ecd7
@sferik sferik authored
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:
Please sign in to comment.
Something went wrong with that request. Please try again.