mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 21:40:39 +03:00
Merge pull request #4855 from jaswilli/serializer-cleanup
Update Ember-Data, remove unneeded code
This commit is contained in:
commit
8693e1dda0
@ -5,7 +5,7 @@
|
||||
"Countable": "2.0.2",
|
||||
"device": "git://github.com/matthewhudson/device.js#5347a275b66020a0d4dfe9aad81a488f8cce448d",
|
||||
"ember": "1.9.0",
|
||||
"ember-data": "1.0.0-beta.12",
|
||||
"ember-data": "1.0.0-beta.14.1",
|
||||
"ember-load-initializers": "git://github.com/stefanpenner/ember-load-initializers.git#0.0.1",
|
||||
"ember-resolver": "git://github.com/stefanpenner/ember-jj-abrams-resolver.git#181251821cf513bb58d3e192faa13245a816f75e",
|
||||
"ember-simple-auth": "0.7.2",
|
||||
|
@ -30,21 +30,6 @@ var PostSerializer = ApplicationSerializer.extend(DS.EmbeddedRecordsMixin, {
|
||||
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) {
|
||||
options = options || {};
|
||||
options.includeId = true;
|
||||
|
@ -13,21 +13,6 @@ var UserSerializer = ApplicationSerializer.extend(DS.EmbeddedRecordsMixin, {
|
||||
delete payload[pluralizedRoot];
|
||||
|
||||
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…
Reference in New Issue
Block a user