Chris,
looking at render.js:
function runShow(fun, ddoc, args) {
try {
resetList();
Mime.resetProvides();
var resp = fun.apply(ddoc, args) || {};
The scope under which the show function is executed is in fact the design
doc. Same goes for _list, _update and _validate.
On Tue, Feb 16, 2010 at 1:56 AM, J Chris Anderson <[email protected]> wrote:
>
> the design doc is available in the view server (in everything but map and
> reduce functions), but it's not exposed to the sandbox (yet).
>
> I'd like to make it so the design doc is the value of 'this' when you are
> inside _show, _list, etc functions.
>
> This would be a small patch if anyone is up for it.
>
> Chris
>
> >
> >
> > Cheers,
> >
> > Zach
>
>
--
Filipe David Manana,
[email protected]
PGP key - http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC569452B
"Reasonable men adapt themselves to the world.
Unreasonable men adapt the world to themselves.
That's why all progress depends on unreasonable men."