misc refactoring

This commit is contained in:
Tj Holowaychuk 2011-07-11 12:53:52 -07:00
parent c275d279fc
commit b30efe4e2f

View File

@ -335,7 +335,7 @@ res._render = function(view, opts, fn, parent, sub){
var options = {}
, self = this
, app = this.app
, helpers = app._locals
, locals = app._locals
, dynamic = app._dynamicLocals
, viewOptions = app.set('view options')
, root = app.set('views') || process.cwd() + '/views';
@ -403,8 +403,8 @@ res._render = function(view, opts, fn, parent, sub){
merge(options, this.__dynamic);
}
// Merge view helpers
union(options, helpers);
// Merge view locals
union(options, locals);
// Always expose partial() as a local
options.partial = function(path, opts){