1
votes

According to the documentation:

http://emberjs.com/guides/ember-data-lifecycle/

Ember data will automatically look to the persistent layer for a record if it's not loaded, how do I only find or even findAll records that have been loaded?

Aside from creating a non-persistent list of loaded records, and look for the record there?

1
New guide location if anyone 404s on the link above. emberjs.com/guides/models/model-lifecycle - Tony Pitale

1 Answers

5
votes

You can do this via a filter:

App.Post.filter(function(post) { return post.get('isLoaded'); });

This will keep an up-to-date Array of only the App.Post records that have been loaded. When new records are loaded, it will automatically update (and update any DOM that is bound to it).