Skip to content
This repository
Browse code

Add documentation for :format => true

  • Loading branch information...
commit 78d151dbac67afebd73665ffcdef2aa8d8517ae1 1 parent c41ecd7
Erik Michaels-Ober authored July 25, 2011

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  railties/guides/source/routing.textile
6  railties/guides/source/routing.textile
Source Rendered
@@ -569,6 +569,12 @@ NOTE: By requesting +"/foo/bar.json"+, your +params[:pages]+ will be equals to +
569 569
 match '*pages' => 'pages#show', :format => false
570 570
 </ruby>
571 571
 
  572
+NOTE: If you want to make the format segment mandatory, so it cannot be omitted, you can supply +:format => true+ like this:
  573
+
  574
+<ruby>
  575
+match '*pages' => 'pages#show', :format => true
  576
+</ruby>
  577
+
572 578
 h4. Redirection
573 579
 
574 580
 You can redirect any path to another path using the +redirect+ helper in your router:

0 notes on commit 78d151d

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