1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add documentation for :format => true

This commit is contained in:
Erik Michaels-Ober 2011-07-25 14:13:26 -07:00 committed by Xavier Noria
parent 710c5eaf2f
commit 6d4f916218

View file

@ -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: