balderdashy/sails — pull request #1562 by mattliegey (2014-03-28 22:32:10+00:00)
Title: Merge locals with with config views options

Adding `sails.config.views.options` to be merged with `locals` in `res.view()`.

example usage:
```javascript
// ../config/views.js

module.exports.views = {
engine : 'jade',
layout : false,
options : {
basedir : '/path/to/includes/basedir'
}
};
```

I'm not sure this is the best way, but I did not see a way to configure options for `res.view()` on an app level (other than adding a custom bootstrap/middleware). There might be a better place to merge the options, or maybe it already does and I missed the config option.

***p.s.*** I did not see a good place for a test for this. If something like this is a good idea I'll go back and add a test.