ember 1.12 findAll issue using rest, pod model over json response -
i have rest adapter right configured , when try:
router.js
export default ember.route.extend({ model: function() { return this.store.find('main.user'); } });
i got this:
warning: encountered "main.user" in payload, no model found model name "mainuser" (resolved model name using plezure@serializer:-rest:.typeforroot("main.user"))
error while processing route:
main.user assertion failed: response findall must array, not undefined error: assertion failed: response findall must array, not undefined
my json return:
{ "main.user": [ { "id": "1", "name": "foo" }, { "id": "2", "name": "bar" } ] }
model.js
import ds 'ember-data'; export default ds.model.extend({ name: ds.attr('string') });
my pod right configured, fine, works if change find non-pod model, (model exists @ main/):
export default ember.route.extend({ model: function() { return this.store.find('main'); } });
but 'main.user' ember uncapable deal json return, using fixtures pod names works well, it's ony happens on json response.
anyone have ideia kind of issue?
Comments
Post a Comment