From 31359419978c3125452539baef7032f8e1650308 Mon Sep 17 00:00:00 2001 From: Simon Rozet Date: Sat, 19 Dec 2009 09:16:31 +0100 Subject: [PATCH] More 'halt' doc --- README.rdoc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.rdoc b/README.rdoc index b0a66004cd..332aa4b835 100644 --- a/README.rdoc +++ b/README.rdoc @@ -303,14 +303,22 @@ To immediately stop a request during a before filter or route use: halt -You can also specify a body when halting ... +You can also specify the status when halting ... + + halt 410 + +Or the body ... halt 'this will be the body' -Or set the status and body ... +Or both ... halt 401, 'go away!' +With headers ... + + halt 402, {'Content-Type' => 'text/plain'}, 'revenge' + == Passing A route can punt processing to the next matching route using pass: