diff --git a/app/adapters/application.js b/app/adapters/application.js index f3b4799e..58d1e98b 100644 --- a/app/adapters/application.js +++ b/app/adapters/application.js @@ -47,5 +47,11 @@ export default ActiveModelAdapter.extend({ } return this._super(...arguments); + }, + + // this can be removed once this PR is merged and live: + // https://github.com/emberjs/data/pull/4204 + findRecord(store, type, id, snapshot) { + return this.ajax(this.buildURL(type.modelName, id, snapshot, 'findRecord'), 'GET'); } }); diff --git a/app/adapters/v3.js b/app/adapters/v3.js index b693f760..7838dd4c 100644 --- a/app/adapters/v3.js +++ b/app/adapters/v3.js @@ -54,5 +54,11 @@ export default RESTAdapter.extend({ pathForType: function(modelName, id) { var underscored = Ember.String.underscore(modelName); return id ? underscored : Ember.String.pluralize(underscored); + }, + + // this can be removed once this PR is merged and live: + // https://github.com/emberjs/data/pull/4204 + findRecord(store, type, id, snapshot) { + return this.ajax(this.buildURL(type.modelName, id, snapshot, 'findRecord'), 'GET'); } });