Skip to content

Instantly share code, notes, and snippets.

@techwraith
Created October 12, 2012 01:32
Show Gist options
  • Save techwraith/3876845 to your computer and use it in GitHub Desktop.
Save techwraith/3876845 to your computer and use it in GitHub Desktop.
var Item = function () {
this.defineProperties({
name: {type: 'string'}
});
this.findByName = function (name, callback) {
geddy.model.Item.all({name: name}, callback);
}
}
Item.findByName = function (name, callback) {
geddy.model.Item.all({name: name}, callback);
// would this work?
// this.all({name: name}, callback);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment