samedi 5 décembre 2015

Strange Ember Data issue - WARNING: Encountered "users" in payload, but no model was found for model name "user"

My payload looks exactly as it should do but Ember Data outputs the following warning in to the console.

WARNING: Encountered "users" in payload, but no model was found for model name "user" (resolved model name using app@serializer:-rest:.modelNameFromPayloadKey("users"))

I have looked in the source code for Ember Data and found that it is doing this:

modelNameFromPayloadKey: function(key) {
  return singularize(normalizeModelName(key));
}

Am I doing this wrong?




Aucun commentaire:

Enregistrer un commentaire