Skip to content

Instantly share code, notes, and snippets.

@sandalsoft
Created June 12, 2014 01:45
Show Gist options
  • Save sandalsoft/8e4ef1ffdd232bb8b06c to your computer and use it in GitHub Desktop.
Save sandalsoft/8e4ef1ffdd232bb8b06c to your computer and use it in GitHub Desktop.
import Ember from 'ember';
var TickerController = Ember.ObjectController.extend({
needs: "application",
ticker_symbol: Ember.computed.alias('controllers.application.ticker_id'),
expirys: Ember.computed.mapBy('model.options', 'expiry'),
expiryList: Ember.computed.uniq('expirys'),
actions: {
filterExpiry: function(expiry) {
this.set('filteredByExpiryOptions', this.get('model.options').filterBy('expiry', expiry));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment