Skip to content
This repository
Browse code

More 'halt' doc

  • Loading branch information...
commit 31359419978c3125452539baef7032f8e1650308 1 parent 336179e
Simon Rozet authored

Showing 1 changed file with 10 additions and 2 deletions. Show diff stats Hide diff stats

  1. 12  README.rdoc
12  README.rdoc
Source Rendered
@@ -303,14 +303,22 @@ To immediately stop a request during a before filter or route use:
303 303
 
304 304
   halt
305 305
 
306  
-You can also specify a body when halting ...
  306
+You can also specify the status when halting ...
  307
+
  308
+  halt 410
  309
+
  310
+Or the body ...
307 311
 
308 312
   halt 'this will be the body'
309 313
 
310  
-Or set the status and body ...
  314
+Or both ...
311 315
 
312 316
   halt 401, 'go away!'
313 317
 
  318
+With headers ...
  319
+
  320
+  halt 402, {'Content-Type' => 'text/plain'}, 'revenge'
  321
+
314 322
 == Passing
315 323
 
316 324
 A route can punt processing to the next matching route using <tt>pass</tt>:

0 notes on commit 3135941

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