Honor the model plural name
This commit is contained in:
parent
c3d7fd0f1c
commit
2ae0fd8804
|
@ -41,8 +41,7 @@ Relation.hasMany = function hasMany(anotherClass, params) {
|
|||
}
|
||||
}
|
||||
}
|
||||
var methodName = params.as ||
|
||||
i8n.camelize(i8n.pluralize(anotherClass.modelName), true);
|
||||
var methodName = params.as || i8n.camelize(anotherClass.pluralModelName, true);
|
||||
var fk = params.foreignKey || i8n.camelize(thisClassName + '_id', true);
|
||||
|
||||
this.relations[methodName] = {
|
||||
|
|
Loading…
Reference in New Issue