Skip to content

Commit

Permalink
Merge pull request #83 from rsutphin/79-should_reload
Browse files Browse the repository at this point in the history
Ember-data never needs to reload ember-pouch records
  • Loading branch information
rsutphin committed Jul 24, 2015
2 parents 30b19d5 + 27af39e commit 753c24b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions addon/adapters/pouch.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ const {
export default DS.RESTAdapter.extend({
coalesceFindRequests: true,

// The change listener ensures that individual records are kept up to date
// when the data in the database changes. This makes ember-data 2.0's record
// reloading redundant.
shouldReloadRecord: function () { return false; },
shouldBackgroundReloadRecord: function () { return false; },

_startChangesToStoreListener: on('init', function () {
this.changes = this.db.changes({
since: 'now',
Expand Down

0 comments on commit 753c24b

Please sign in to comment.