title: Error: Route.post() requires callback functions but got a [object Undefined]
body: <p>Has a callback don't know why this isn't working...I have working user system in place and I essentially just copied that system. Don't know why one works and the other doesn't. I've omitted the irrelevant code and included the jobs in the users model file out of laziness.</p>
  
  <p>Error: Route.post() requires callback functions but got a [object Undefined]
  It looks like this line app.post('/postjob', jobs.createJob); triggers the error.</p>
  
  <pre><code>[index.js]
  mongoose.connect(uri);
  require('./models/users_model.js');
  require('./routes/routes.js')(app);
  
  [routes.js]
  module.exports = function(app){
  
      var jobs = require('../controllers/jobs_controller.js');
  
      app.all('/postjob', function(req, res){
          if (typeof req.session !== 'undefined' &amp;&amp; req.session.user) {
              res.redirect('/');
          }
          res.render('pages/login', {msg:req.session.msg});
      });
  
      app.post('/postjob', jobs.createJob);
  }
  
  
  
  [jobs_controller.js]
  var mongoose = require('mongoose'),
      Job = mongoose.model('Job');
  
  module.exports = function(app){
  
      exports.createJob = function(req, res){
  
          var job = new Job({created: Date.now});
          job.set('title', req.body.title);
          job.set('description', req.body.description);
          job.set('hours', req.body.hours);
          job.save(function(err){
              if (err) {
                  alert(err);
              }
              else {
                  alert('Job Posted Succesfully');
              }
          });
  
      }
  
  };
  
  [users_models.js]
  var mongoose = require('mongoose'),
      Schema = mongoose.Schema;
  
  var UserSchema = new Schema ({
      username: { type: String, unique: true },
      email: String,
      color: String,
      hashed_password: String
  });
  
  mongoose.model('User', UserSchema);
  
  var JobSchema = new Schema ({
      created: Date,
      postedBy: String,
      title: String,
      description: String,
      hours: String,
      applicants: String,
      closed: Date
  });
  
  mongoose.model('Job', JobSchema);
  </code></pre>