Permalink
Browse files

move default of "views" out so multiple cwd() calls are not made

  • Loading branch information...
1 parent bf60d5a commit 76d3ec583d9ea7dba164765a106d3b7a6f764180 @tj tj committed Oct 6, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/application.js
View
7 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) {

0 comments on commit 76d3ec5

Please sign in to comment.