Skip to content

Commit

Permalink
Merge pull request #75 from OleRoel/72-deprecated_find
Browse files Browse the repository at this point in the history
Fixes one part of #72.
  • Loading branch information
rsutphin committed Jun 29, 2015
2 parents aa32f1d + c15b085 commit 44b2019
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions addon/adapters/pouch.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,18 @@ export default DS.RESTAdapter.extend({
"See https://github.com/nolanlawson/ember-pouch/issues/7.");
},

/**
* `find` has been deprecated in ED 1.13 and is replaced by 'new store
* methods', see: https://github.com/emberjs/data/pull/3306
* We keep the method for backward compatibility and forward calls to
* `findRecord`. This can be removed when the library drops support
* for deprecated methods.
*/
find: function (store, type, id) {
return this.findRecord(store, type, id);
},

findRecord: function (store, type, id) {
this._init(store, type);
var recordTypeName = this.getRecordTypeName(type);
return this.db.rel.find(recordTypeName, id).then(function (payload) {
Expand Down

0 comments on commit 44b2019

Please sign in to comment.