Add hint, minor cleanup

This commit is contained in:
Fabien Franzen 2014-08-30 21:08:23 +02:00
parent 0a9cb72837
commit e874810499
1 changed files with 4 additions and 2 deletions

View File

@ -241,7 +241,9 @@ describe('scope - dynamic target class', function () {
Video = db.define('Video', {name: String});
Collection = db.define('Collection', {name: String, modelName: String});
Collection.scope('items', {}, null, {}, { isStatic: false, modelTo: function(receiver) {
Collection.scope('items', function() {
return {}; // could return a scope based on `this` (receiver)
}, null, {}, { isStatic: false, modelTo: function(receiver) {
return db.models[receiver.modelName];
} });
});
@ -313,4 +315,4 @@ describe('scope - dynamic target class', function () {
});
});
});
});