diff --git a/lib/application.js b/lib/application.js index 36cc31df02..340f0c0b67 100644 --- a/lib/application.js +++ b/lib/application.js @@ -83,6 +83,7 @@ app.defaultConfiguration = function(){ this.locals.settings = this.settings; // default configuration + this.set('views', process.cwd() + '/views'); this.set('jsonp callback name', 'callback'); this.configure('development', function(){ @@ -484,9 +485,9 @@ app.render = function(name, options, fn){ // view if (!view) { view = new View(name, { - defaultEngine: this.get('view engine') - , root: this.get('views') || process.cwd() + '/views' - , engines: engines + defaultEngine: this.get('view engine'), + root: this.get('views'), + engines: engines }); if (!view.path) {