Skip to content

Commit

Permalink
(pouchdb-community#79) - Ember-data never needs to reload ember-pouch…
Browse files Browse the repository at this point in the history
… records.

See pouchdb-community#79 and pouchdb-community#80 for discussions of why, and why this covers the individual
record case only.
  • Loading branch information
rsutphin committed Jul 23, 2015
1 parent 30b19d5 commit 27af39e
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 27af39e

Please sign in to comment.