Skip to content

Instantly share code, notes, and snippets.

@deanlandolt
Created January 22, 2010 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deanlandolt/283934 to your computer and use it in GitHub Desktop.
Save deanlandolt/283934 to your computer and use it in GitHub Desktop.
var couch = require("store/couch");
var couchStore = couch.Database("test_suite_db");
var TestModel = require("model").Model("TestModel", couchStore, {
prototype: {
testMethod: function(){
return this.foo;
}
},
staticMethod: function(id){
return this.get(id);
},
properties: {
foo: {type: "number"}
},
links: [
{rel: "foo", href: "{foo}"}
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment