From e2f9d1f26588020e51899b79258366d51e6913a7 Mon Sep 17 00:00:00 2001 From: Christoffer Persson Date: Tue, 16 Jun 2015 16:36:10 +0200 Subject: [PATCH] Improve deprecation for not using the new Serializer API --- packages/ember-data/lib/initializers/store.js | 4 ++-- .../ember-data/lib/system/store/container-instance-cache.js | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/ember-data/lib/initializers/store.js b/packages/ember-data/lib/initializers/store.js index cfe36b195dc..58c3eaf0d21 100644 --- a/packages/ember-data/lib/initializers/store.js +++ b/packages/ember-data/lib/initializers/store.js @@ -34,8 +34,8 @@ export default function initializeStore(registry, application) { ]); // new go forward paths - registry.register('serializer:-default', JSONSerializer); - registry.register('serializer:-rest', RESTSerializer); + registry.register('serializer:-default', JSONSerializer.extend({ isNewSerializerAPI: true })); + registry.register('serializer:-rest', RESTSerializer.extend({ isNewSerializerAPI: true })); registry.register('adapter:-rest', RESTAdapter); registry.register('adapter:-json-api', JSONAPIAdapter); diff --git a/packages/ember-data/lib/system/store/container-instance-cache.js b/packages/ember-data/lib/system/store/container-instance-cache.js index 5fbb9c90be6..94d19ba85c7 100644 --- a/packages/ember-data/lib/system/store/container-instance-cache.js +++ b/packages/ember-data/lib/system/store/container-instance-cache.js @@ -46,9 +46,6 @@ Ember.merge(ContainerInstanceCache.prototype, { let instance = this.instanceFor(lookupKey); if (instance) { - if (fallback === '-default') { - instance.set('isNewSerializerAPI', true); - } return instance; } }