Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
EmberJS belongsTo
App.User = DS.Model.extend({
name: DS.belongsTo('name', { embedded: true }),
email: DS.attr('string')
App.Name = DS.Model.extend({
first: DS.attr('string'),
last: DS.attr('string')
App.UserEditController = Ember.ObjectController.extend({
actions: {
save: function () {
var name ='name', { first: 'Mirko', last: 'Akov' });
this.set('name', name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment