Issue with loading fixture data: Encountered "0" in payload, but no model was found for model name "0"
See original GitHub issueHi Sam,
I’m a bit of a newbie to Ember and I’m trying to use mirage in order to quickly develop a shopping site. I’ve used mirage to create fixtures and my app is correctly making the api calls and getting the data, but i’m getting the following warnings (basically they are numbered till 12, since I have 13 fixtures) in my dev console:
WARNING: Encountered “0” in payload, but no model was found for model name “0” (resolved model name using ember-responsive-retailer@serializer:-rest:.modelNameFromPayloadKey(“0”))
Here is my code: mirage/config.js: https://gist.github.com/zshnr/f8acf076bcf87dc5b3de mirage/fixtures/products.js: https://gist.github.com/zshnr/6696ba7ede17cd21b261 app/adapters/application.js: https://gist.github.com/zshnr/ac13ead44b1a58c8187a app/model/product.js: https://gist.github.com/zshnr/80080ae22d26a5aa220b
I’m using ember.js 1.13.2
and ember-data 1.13.2
I have a feeling this issue is like #168 but I didn’t understand what that user did to fix the problem.
Thanks a lot!
Issue Analytics
- State:
- Created 8 years ago
- Comments:6
Top GitHub Comments
Nevermind, I fixed it. So for anyone else having this problem, i’ll leave the solution here:
I found the solution from the documentation here: http://www.ember-cli-mirage.com/docs/v0.1.x/shorthands/
my original mirage/config.js: https://gist.github.com/zshnr/f8acf076bcf87dc5b3de the fixed mirage/config.js: https://gist.github.com/zshnr/58194084e225497f2769
a13496a13dac58fb6417bcba98efdc4bdc9a93c5