John Polling
John Polling

Reputation: 2282

Ember Data RestAdapter find() doesn't appear to be returning a record

I have the following code which works in Ember Data Beta 8.

return store.find('user', userId).then(function(user) {
  return {
    currentUser: user
  };
});

As soon as I upgrade to Beta 9 the code appears to fail to return the currentUser object. This is using the ActiveModelAdapter. I can't spot anything that different between the RESTAdapter find or ajax methods between Beta 8 and 9. Am I missing something obvious?

Upvotes: 0

Views: 61

Answers (1)

Andrew Hacking
Andrew Hacking

Reputation: 6366

In recent Ember-Data betas Store.find() will always return a promise, even if the record is already in the store.

You can read the latest docs for Store.find here.

Upvotes: 1

Related Questions