Example #1
0
test('model invalid type', function(done, fail) {
    try {
        var d1 = models('does not exist trololo');
        fail();
    } catch(e) {
        done();
    }
});
Example #2
0
 return require('requests').get(url).done(function(data) {
     var cache = models(model);
     console.groupCollapsed('Casting ' + model + 's to model cache...');
     data.objects.forEach(function(obj) {
         cache.cast(obj);
     });
     console.groupEnd();
 });
Example #3
0
 helpers.model_lookup = function(model, key, by) {
     return models(model).lookup(key, by);
 };
Example #4
0
 return require('requests').get(url).done(function(data) {
     var cache = models(model);
     data.objects.forEach(function(obj) {
         cache.cast(obj);
     });
 });