Skip to content

Commit

Permalink
Layouts only work with EJS now
Browse files Browse the repository at this point in the history
  • Loading branch information
sgress454 committed Oct 26, 2016
1 parent cf20d07 commit 9f1f2fb
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/hooks/views/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,8 @@ module.exports = function configure ( sails ) {
sails.config.views.layout = 'layout.' + sails.config.views.engine.ext;
}

var layoutableEngines = [
'ejs',
'handlebars',
'ractive'
];
if ( sails.config.views.layout && layoutableEngines.indexOf(engineName) < 0 ) {
sails.log.warn('Sails\' built-in layout support only works with the `' +
layoutableEngines.join('`, `') + '` view engines.');
if ( sails.config.views.layout && engineName !== 'ejs' ) {
sails.log.warn('Sails\' built-in layout support only works with the EJS view engine.');
sails.log.warn('You\'re using `'+ engineName +'`.');
sails.log.warn('Ignoring `sails.config.views.layout`...');
}
Expand Down

0 comments on commit 9f1f2fb

Please sign in to comment.