title: Sails.js template helper (filter) with promise
body: <p>I'm just getting into Sails.js and was wondering if there was a way with the EJS templating system to have a helper function run which includes a promise or database query. This works:</p>
  
  <p>in config/http.js:</p>
  
  <pre><code>module.exports.http = {
    // ...
    locals: {
      filters: {
        testHelper: function(input) { return input; }
      }
    }
  }
  </code></pre>
  
  <p>This does not:</p>
  
  <pre><code>module.exports.http = {
    // ...
    locals: {
      filters: {
        testHelper: function(input) {
              MyModal.create({test:'test'}).exec(function(err,mm){
                    return input+'-'+mm.test;
                });
            }
      }
    }
  }
  </code></pre>
  
  <p>The first always returns "check", the second always returns "undefined" when used in a template <code>"{{ 'check' | testHelper }}"</code></p>