jeudi 9 mars 2017

How to override peek method in Ember data?

My application has scenario of having users (both active and deleted ) in the users.js model.

But earlier it was only having active users. so, if I add deleted to the same model then it would affect other places where I don't need to the deleted users and which lead me to make changes in many places.

so, I wanted to override peekAll in ember-data to get required data from user model.

something like this:

App.ApplicationAdapter = DS.RESTAdapter.extend({
    peek: () {
        //...
    }
});

But there is no such thing in ember-data docs.

Is there any way to override peekAll method ?




Aucun commentaire:

Enregistrer un commentaire