LearnBoost/mongoose — pull request #1194 by synaptiko (2012-11-05 19:31:58+00:00)
Title: Correct 'this' reference in statics of model.

I have followed example of statics from docs:
```javascript
animalSchema.statics.findByName = function (name, cb) {
this.find({ name: new RegExp(name, 'i') }, cb);
}
```

But it seems that 'this' is global context. I think it would be possible to use Function.bind to fix it - see my commit.

Sorry that I don't know where I should write test for it, they are too chaotic for me :-)