1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Document accessing response body in after filter. Fixes #168.

This commit is contained in:
Konstantin Haase 2011-02-17 16:14:56 +01:00
parent e07a6030cc
commit 380c312269

View file

@ -699,6 +699,10 @@ and routes are accessible by after filters:
puts response.status
end
Note: Unless you use the `body` method rather than just returning a String from
the routes, the body will not yet be available in the after filter, since it is
generated later on.
Filters optionally taking a pattern, causing them to be evaluated only if the
request path matches that pattern: