Let’s say I have this serializers/application.js:
import Ember from 'ember';
import DS from 'ember-data';
export default DS.JSONAPISerializer.extend({
keyForAttribute: function (attr) {
return Ember.String.underscore(attr);
},
});
Now I need another serializer for one of my model: serializers/post.js:
import DS from 'ember-data';
export default DS.JSONAPISerializer.extend({
attrs: {
my_game: {
serialize: false
}
}
});
My serializer/post now doesn’t take automagically the code from serializers/application.js, so this code doesn’t work anymore in my post model:
keyForAttribute: function (attr) {
return Ember.String.underscore(attr);
}
I need to extend the serializers/application.js in my serializers/post.js?