-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Am I missing something, or could the alternative examples be simplified using Ember.computed.filterBy to just be:
// app/controllers/posts.js
export default Ember.Controller.extend({
posts: Ember.computed(function() {
return this.store.peekAll('post');
}),
filteredPosts: Ember.computed.filterBy('posts', 'isPublished')
});and
// app/models/post.js
export default DS.Model.extend({
comments: DS.hasMany('comment'),
maintainedComments: Ember.computed.filterBy('comments', 'isDeleted', false);
})
});Metadata
Metadata
Assignees
Labels
No labels