LearnBoost/mongoose — pull request #727 by niemyjski (2012-02-08 20:01:43+00:00)
Title: I have a rest controller and I'm dynamically passing that value into lim...

...it which turns out to be a string... Which doesn't throw an error or....

Passed in value limit("2").. by calling parseInt fixes this bug...

One could be a little safer and do something like this:

if(v != null && typeof v != 'undefined' && v.length > 0 && !isNaN(v) {
this.options[method] = parseInt(v);
} else { throw Error()..... }