From 0cd88bce7d7bc101b5aa039112550ba188284bc8 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 19 Oct 2015 16:35:17 +0100 Subject: [PATCH] Keep old `shouldBackgroundReloadRecord` behaviour ready for 2.0 upgrade no issue - adds `shouldBackgroundReloadRecord` override so that we keep the current behaviour (never background reload unless instigated manually) when we upgrade to Ember Data 2.0 which will always background-reload by default --- ghost/admin/app/adapters/application.js | 8 +++++++- ghost/admin/app/adapters/base.js | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ghost/admin/app/adapters/application.js b/ghost/admin/app/adapters/application.js index c6a840c521..b1adf340e7 100644 --- a/ghost/admin/app/adapters/application.js +++ b/ghost/admin/app/adapters/application.js @@ -1,3 +1,9 @@ import EmbeddedRelationAdapter from 'ghost/adapters/embedded-relation-adapter'; -export default EmbeddedRelationAdapter.extend(); +export default EmbeddedRelationAdapter.extend({ + + shouldBackgroundReloadRecord: function () { + return false; + } + + }); diff --git a/ghost/admin/app/adapters/base.js b/ghost/admin/app/adapters/base.js index bb5f750d7a..427459f05e 100644 --- a/ghost/admin/app/adapters/base.js +++ b/ghost/admin/app/adapters/base.js @@ -5,6 +5,10 @@ export default DS.RESTAdapter.extend({ host: window.location.origin, namespace: ghostPaths().apiRoot.slice(1), + shouldBackgroundReloadRecord: function () { + return false; + }, + query: function (store, type, query) { var id;