Add hint, minor cleanup
This commit is contained in:
parent
0a9cb72837
commit
e874810499
|
@ -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 () {
|
|||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue