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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -