Skip to content
Myr

Added docs for `status` option special-case. Closes #739

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 5ae994e · Browse files · 1 file+9 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−0 removed

  • other:+9 added−0 removed

1 file+9 added−0 removed

modified:docs/guide.md+9 added
985 unmodified lines
986987 var user = { name: 'tj' };988 res.render('index', { layout: false, user: user });989990This _options_ object is also considered an "options" object. For example 991when you pass the _status_ local, it's not only available to the view, it992sets the response status to this number. This is also useful if a template993engine accepts specific options, such as _debug_, or _compress_. Below994is an example of how one might render an error page, passing the _status_ for995display, as well as it setting _res.statusCode_.996997 res.render('error', { status: 500, message: 'Internal Server Error' });998999### res.partial(view[, options])10001001Render _view_ partial with the given _options_. This method is always available1002to the view as a local variable.
423 unmodified lines