Full error:
Uncaught Error: Assertion Failed: You may not set `id` as an attribute on your model. Please remove any lines that look like: `id: DS.attr('<type>')` from App.Plan
Ember Model:
App.Plan = DS.Model.extend({ id: DS.attr('number'), name: DS.attr('string'), period: DS.attr('number'), price: DS.attr('number') });
Data coming from the REST API:
{"plans":[{"id":1,"name":"Monthly subscription","period":1,"price":2}]}
Question: How can I navigate the above error?
Bogdan zurac
source share