Skip to content

Instantly share code, notes, and snippets.

@Codercise
Last active December 18, 2015 02:29
Show Gist options
  • Save Codercise/5711629 to your computer and use it in GitHub Desktop.
Save Codercise/5711629 to your computer and use it in GitHub Desktop.
App.FoodController = Ember.ArrayController.extend({
addFood: function(food) {
var table = this.controllerFor('table').get('model'),
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