Permalink
Browse files

added instanceMethods

  • Loading branch information...
1 parent 8b09c6b commit 993d6c4849d3552b895899fdf176ff1db2d44c57 Tiago Peruzzo committed Sep 13, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/model.js
View
@@ -207,6 +207,10 @@ exports.define = function (name, columnDefs, opts) {
}
createColumnPropertiesOnObject(this);
+ for (var key in opts.instanceMethods) {
+ this[key] = opts.instanceMethods[key];
+ this[key] = persistUtil.bind(key, this[key], this);
+ }
return this;
};

0 comments on commit 993d6c4

Please sign in to comment.