title: Sails.js - creating empty models
body: <p>This is the controller that I am using to create a new instance of my human model:</p>
  
  <pre><code>newh: function(req, res) {
  var firstName = req.param('firstName');
  var lastName = req.param('lastName');
  var contact = req.param('contact');
  var email = req.param('email');
  
  var home = 'http://localhost:1337/humans';
  
  Human.create({
      firstName: firstName,
      lastName: lastName,
      contact: contact,
      email: email
  }).done(function(err, user) {
      if(err) {
          return console.log('Could not create user. Error: ' + err);
      }else{
          res.redirect('/humans');
      }
  });
  </code></pre>
  
  <p>This is the script that I am using to post the data to the controller:</p>
  
  <pre><code>$(document).ready(function() {
  var firstName = $('#first').val();
  var lastName = $('#last').val();
  var contact = $('#contact').val();
  var email = $('#email').val();
  
  $('#add').on('click', function() {
      $.ajax({
          type: 'POST',
          url: '/humans/new',
          data: {
              firstName: firstName,
              lastName: lastName,
              contact: contact,
              email: email
          },
          success: function() {
              console.log('Successfully passed data.');
          }
  
      });
  });
  });
  </code></pre>
  
  <p>Whenever I post the information, the success function gets executed. Still, my controller doesn't seem to make use of that res.redirect() call and it simply generates empty instances of the human model.</p>
  
  <p>What's the problem? </p>
  
  <p>Thank you!</p>