Skip to content

Instantly share code, notes, and snippets.

@BlakeWilliams
Forked from Codercise/gist:5711629
Last active December 18, 2015 02:29
Show Gist options
  • Save BlakeWilliams/5711635 to your computer and use it in GitHub Desktop.
Save BlakeWilliams/5711635 to your computer and use it in GitHub Desktop.
App.FoodController = Ember.ArrayController.extend({
needs: 'table',
tableBinding: 'controllers.table',
addFood: function(food) {
var table = this.get('table').get('content')
tabItems = table.get('tab.tabItems');
tabItems.createRecord({
food: food,
cents: food.get('cents')
});
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment