title: Sails.js - How to render a partial from a controller?
body: <p>I have a partial view containing my login form. I would like to render it from an ajax call to my controller.</p>
  
  <p>This is the sample where i would return my partial view:</p>
  
  <pre><code>postlogin: function (req,res) {
  
      var username = req.param('username');
      var password = req.param('password');
  
      User.find({
          username: username,
          password: password.salt()
      }).done(function(err, users){
          if(users.length == 1){
              // Here I want to return a partial view, not a view
              res.view('home/login', {message: 'Login success!'});
          }else{
              // Here I want to return a partial view, not a view
              res.view('home/login', {message: 'Login failed!'});
          }
      });
    },
  </code></pre>