From f0d7a918a1720b07c66537da12b543b647998e3e Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Sun, 25 Jan 2015 19:57:20 +0000 Subject: [PATCH] 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. --- ghost/admin/serializers/post.js | 15 --------------- ghost/admin/serializers/user.js | 15 --------------- 2 files changed, 30 deletions(-) diff --git a/ghost/admin/serializers/post.js b/ghost/admin/serializers/post.js index ba8704bff6..e668ac22eb 100644 --- a/ghost/admin/serializers/post.js +++ b/ghost/admin/serializers/post.js @@ -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; diff --git a/ghost/admin/serializers/user.js b/ghost/admin/serializers/user.js index 2ee6a886b0..b83b0b52c7 100644 --- a/ghost/admin/serializers/user.js +++ b/ghost/admin/serializers/user.js @@ -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; } });