From bb11d583c163a6b4d47d94326026bdc0a46e8af2 Mon Sep 17 00:00:00 2001 From: Stanley Stuart Date: Sun, 14 Jun 2015 12:34:46 -0500 Subject: [PATCH] deprecate ActiveModelAdapter being bundled with core --- packages/ember-data/lib/main.js | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/packages/ember-data/lib/main.js b/packages/ember-data/lib/main.js index 09a6a1ae872..d8b90b474ec 100644 --- a/packages/ember-data/lib/main.js +++ b/packages/ember-data/lib/main.js @@ -120,8 +120,27 @@ DS.StringTransform = StringTransform; DS.NumberTransform = NumberTransform; DS.BooleanTransform = BooleanTransform; -DS.ActiveModelAdapter = ActiveModelAdapter; -DS.ActiveModelSerializer = ActiveModelSerializer; +if (Ember.platform.hasPropertyAccessors) { + Ember.defineProperty(DS, 'ActiveModelAdapter', { + get: function() { + Ember.deprecate('The ActiveModelAdapter has been moved into a plugin. It will not be bundled with Ember Data in 2.0', false, { + url: 'https://github.com/ember-data/active-model-adapter' + }); + return ActiveModelAdapter; + } + }); + Ember.defineProperty(DS, 'ActiveModelSerializer', { + get: function() { + Ember.deprecate('The ActiveModelSerializer has been moved into a plugin. It will not be bundled with Ember Data in 2.0', false, { + url: 'https://github.com/ember-data/active-model-adapter' + }); + return ActiveModelSerializer; + } + }); +} else { + DS.ActiveModelAdapter = ActiveModelAdapter; + DS.ActiveModelSerializer = ActiveModelSerializer; +} DS.EmbeddedRecordsMixin = EmbeddedRecordsMixin; DS.belongsTo = belongsTo;