-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
The following code in the ModelRegistry constructor doesn't seem to make sense. In the callback modelName is actually the index for the lodash _.foreach function
Seems like it should be this.registerMode(model,model.modelName). Maybe you are meaning to name things as the index, but later you try to humanize this term. I keep getting an error when you call capitalize on the 0(the index of the first item). I guess I'd pass this if I had a label on my model, but I don't.
_.forEach(models, function (model, modelName) {
this.registerModel(model, modelName);
_.forEach(model.discriminators, function (discModel, discName) {
this.registerModel(discModel, discName, {hidden: true});
}.bind(this));
}.bind(this));
Metadata
Metadata
Assignees
Labels
No labels