title: how to include external models in mongoose?
body: <p>i have a problem when i want to include my models with mongoose in nodejs, i'm create a models with schema like this </p>
  
  <pre><code>var mongoose = require('mongoose')
    , Schema = mongoose.Schema;
  
  var Users = new Schema({
      idUser  : {type:String},
      username: {type:String}
  });
  
  // middleware
  Users.pre('save', function (next,done) {
    notify(this.get('email') + done);
    // something goes wrong
    next(new Error('something went wrong'));
  });
  
  //registered on mongoose models
  mongoose.model("Users",Users);
  </code></pre>
  
  <p>and i save in folde models/schema.js
  but i don't know how to call that file in app.js , when i'm try using this code</p>
  
  <pre><code>var mongoose = require('mongoose')
    , models = require('./models/schema.js');
  
  //mongoose configurationfor database;
  var db = mongoose.connect("mongodb://localhost/vynchat");
  var users = mongoose.model("Users");
  users.save();
  </code></pre>
  
  <p>i have error when i try to start <code>sudo node app.js</code> </p>
  
  <pre><code>throw e; // process.nextTick error, or 'error' event on first tick
                ^
  TypeError: Object function model() {
      Model.apply(this, arguments);
    } has no method 'save'
      at Object.&lt;anonymous&gt; (/opt/development/vynapp/app.js:18:7)
      at Module._compile (module.js:441:26)
      at Object..js (module.js:459:10)
      at Module.load (module.js:348:31)
      at Function._load (module.js:308:12)
      at Array.0 (module.js:479:10)
      at EventEmitter._tickCallback (node.js:192:40)
  </code></pre>
  
  <p>the error model() has no method save...
  how i can fix this..?</p>