diff --git a/README.rdoc b/README.rdoc index 6e878783..0d408193 100644 --- a/README.rdoc +++ b/README.rdoc @@ -999,6 +999,23 @@ The request.body is an IO or StringIO object: "Hello #{data['name']}!" end +=== Attachments + +You can use the +attachment+ helper to tell the browser the response should be +stored on disk rather than displayed in the browser. + + get '/' do + attachment + "store it!" + end + +You can also pass it a file name: + + get '/' do + attachment "info.txt" + "store it!" + end + === Looking Up Template Files The find_template helper is used to find template files for rendering: