Matt Blair

Matt Blair

I read that you learn more from a poor example than from a correct one. I don't believe this but that means my site will be a success.

Ember FilterBy Fun

Ember FilterBy Fun

1-Minute Read

If you happen to be writing filterBy statements in Ember against an object, you will want to use this syntax:

  skusForStyle: function(style) {
    return this.get('mergedSkus').filterBy('style.id', style.get('id'));
  }

Instead of this similar looking but exceptionally evil and non-functioning cousin:

  skusForStyle: function(style) {
    return this.get('mergedSkus').filterBy('style', style);
  }

Recent Posts

Categories

About

This theme was developed for Hugo.