Skip to content

Commit

Permalink
Adds instance.model() to get the model of an instance (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
dresende committed Aug 8, 2013
1 parent 6b29a51 commit ad97778
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,12 @@ function Instance(Model, opts) {
},
enumerable: false
});
Object.defineProperty(instance, "model", {
value: function (cb) {
return Model;
},
enumerable: false
});

for (var i = 0; i < opts.id.length; i++) {
if (!opts.data.hasOwnProperty(opts.id[i])) {
Expand Down

0 comments on commit ad97778

Please sign in to comment.