mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Update Ember-Data, remove unneeded code
No Issue. - Ember-Data@1.0.0-beta.14.1. - Remove code from serializers for a workaround that's no longer needed.
This commit is contained in:
parent
245b0bea12
commit
f0d7a918a1
2 changed files with 0 additions and 30 deletions
|
@ -30,21 +30,6 @@ var PostSerializer = ApplicationSerializer.extend(DS.EmbeddedRecordsMixin, {
|
||||||
return this._super.apply(this, arguments);
|
return this._super.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
keyForAttribute: function (attr) {
|
|
||||||
return attr;
|
|
||||||
},
|
|
||||||
|
|
||||||
keyForRelationship: function (relationshipName) {
|
|
||||||
// this is a hack to prevent Ember-Data from deleting our `tags` reference.
|
|
||||||
// ref: https://github.com/emberjs/data/issues/2051
|
|
||||||
// @TODO: remove this once the situation becomes clearer what to do.
|
|
||||||
if (relationshipName === 'tags') {
|
|
||||||
return 'tag';
|
|
||||||
}
|
|
||||||
|
|
||||||
return relationshipName;
|
|
||||||
},
|
|
||||||
|
|
||||||
serializeIntoHash: function (hash, type, record, options) {
|
serializeIntoHash: function (hash, type, record, options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
options.includeId = true;
|
options.includeId = true;
|
||||||
|
|
|
@ -13,21 +13,6 @@ var UserSerializer = ApplicationSerializer.extend(DS.EmbeddedRecordsMixin, {
|
||||||
delete payload[pluralizedRoot];
|
delete payload[pluralizedRoot];
|
||||||
|
|
||||||
return this._super.apply(this, arguments);
|
return this._super.apply(this, arguments);
|
||||||
},
|
|
||||||
|
|
||||||
keyForAttribute: function (attr) {
|
|
||||||
return attr;
|
|
||||||
},
|
|
||||||
|
|
||||||
keyForRelationship: function (relationshipName) {
|
|
||||||
// this is a hack to prevent Ember-Data from deleting our `tags` reference.
|
|
||||||
// ref: https://github.com/emberjs/data/issues/2051
|
|
||||||
// @TODO: remove this once the situation becomes clearer what to do.
|
|
||||||
if (relationshipName === 'roles') {
|
|
||||||
return 'role';
|
|
||||||
}
|
|
||||||
|
|
||||||
return relationshipName;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue