Hi there,
I have a serializer video.js
export default DS.ActiveModelSerializer.extend(DS.EmbeddedRecordsMixin, {
attrs: {
videoScenes: { embedded: 'always' },
videoColours: { embedded: 'always' }
}
});
which works great when I call model.save()
on my video models.
However I have a route start.js
that has;
model: function() {
var store = this.store;
return Ember.$.getJSON("/start").then(function(data) {
return store.createRecord("video", data.video);
});
}
that throws Uncaught Error: Cannot set read-only property "videoScenes" on object: <frontend@model:video::ember885:12262>
my guess is that the start route is not using the video serializer?
Are serializers tied to models or routes? How can I get this route to deserialize the json as it does under video
routes?