From 47989c3b89aae895beb35650da6188484097fd7b 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 --- core/client/app/adapters/application.js | 8 +++++++- core/client/app/adapters/base.js | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/client/app/adapters/application.js b/core/client/app/adapters/application.js index c6a840c521..b1adf340e7 100644 --- a/core/client/app/adapters/application.js +++ b/core/client/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/core/client/app/adapters/base.js b/core/client/app/adapters/base.js index bb5f750d7a..427459f05e 100644 --- a/core/client/app/adapters/base.js +++ b/core/client/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;