Permalink
Browse files

Assume 'ejs' to be default engine for .html views (if config not set)

  • Loading branch information...
1 parent 3176ccf commit d55e828095f1dfeb9dc5378f559a1febbf9c9e1e @mendezcode mendezcode committed Sep 10, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/application.js
View
@@ -491,9 +491,15 @@ obtained for routes and any other type of data validation are accurate.\n", r, r
this.enginesByExtension[key] = engine;
}
}
+
+ // Set default view extension if not set
+ if (typeof this.config.viewExtensions.html == 'undefined') {
+ this.config.viewExtensions.html = 'ejs';
+ }
// Override engine extensions (from config)
var ext, extOverrides = this.config.viewExtensions;
+
for (ext in extOverrides) {
if (exts.indexOf(ext) == -1) exts.push(ext); // Register extension on `exts`
engine = this.engines[extOverrides[ext]]; // Get engine object

0 comments on commit d55e828

Please sign in to comment.