jeudi 11 février 2016

Conditionally embedding records in an ember-data model

I have embedded records using a model serializer.

export default DS.RESTSerializer.extend(DS.EmbeddedRecordsMixin, {
  attrs: {
    myRelationships: {
      serialize: 'records'
    },
  }
});

The poroblem is that there are time I don't want to serialize the relationships. How can I do this?




Aucun commentaire:

Enregistrer un commentaire