mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
add example for halt with template
This commit is contained in:
parent
3edbafe525
commit
5f5bb9d029
1 changed files with 4 additions and 0 deletions
|
@ -821,6 +821,10 @@ With headers:
|
||||||
|
|
||||||
halt 402, {'Content-Type' => 'text/plain'}, 'revenge'
|
halt 402, {'Content-Type' => 'text/plain'}, 'revenge'
|
||||||
|
|
||||||
|
It is of course possible to combine a template with +halt+:
|
||||||
|
|
||||||
|
halt erb(:error)
|
||||||
|
|
||||||
=== Passing
|
=== Passing
|
||||||
|
|
||||||
A route can punt processing to the next matching route using <tt>pass</tt>:
|
A route can punt processing to the next matching route using <tt>pass</tt>:
|
||||||
|
|
Loading…
Reference in a new issue