Mapping JSON attributes to ember-data models
With the new Ember Data 1.0 Beta I had the problem that my JSON had a reserved attribute name "model" that represented a Vehicle's make/model. This of course causes problems in your handlebars and probably everywhere else.
The easiest solution I found was to use a custom serializer for my Vehicle model and describe in there an attrs object.
App.VehicleSerializer = DS.RESTSerializer.extend({ attrs: { 'makeModel' : 'model' } });
Voilá! Problem solved!















