Skip to content
Myr

viewHelpers -> _locals

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 e4c840f · Browse files · 2 files+3 added−3 removed
This commit

State

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

Diff stats

2 files+3 added−3 removed

  • other:+3 added−3 removed

2 files+3 added−3 removed

modified:lib/http.js+2 added-2 removed
47 unmodified lines
48 this.lookup = {};49 this.settings = {};50 this.redirects = {};51 this.isCallbacks = {};52 this.viewHelpers = {};52 this._locals = {};53 this.dynamicViewHelpers = {};54 this.errorHandlers = [];5556 // default "home" to /
183 unmodified lines
240 */241242Server.prototype.helpers =243Server.prototype.locals = function(obj){244 utils.merge(this.viewHelpers, obj);244 utils.merge(this._locals, obj);245 return this;246};247248/**
246 unmodified lines
modified:lib/view.js+1 added-1 removed
259 unmodified lines
260res._render = function(view, opts, fn, parent, sub){261 var options = {}262 , self = this263 , app = this.app264 , helpers = app.viewHelpers264 , helpers = app._locals265 , dynamicHelpers = app.dynamicViewHelpers266 , viewOptions = app.set('view options')267 , cacheViews = app.enabled('view cache')268 , root = app.set('views') || process.cwd() + '/views';
149 unmodified lines