Skip to content

Instantly share code, notes, and snippets.

@ap4y
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ap4y/9880944 to your computer and use it in GitHub Desktop.
Save ap4y/9880944 to your computer and use it in GitHub Desktop.
Ember Data beta 7 embedded records
CarnivalMobile.Message = DS.Model.extend({
title: DS.attr('string'),
notifications: DS.hasMany('notification')
});
CarnivalMobile.MessageSerializer = DS.ActiveModelSerializer.extend(DS.EmbeddedRecordsMixin, {
attrs: {
notifications: { embedded: 'always' }
}
}
CarnivalMobile.TextMessage.FIXTURES = [
{
id: 1,
startTime: CarnivalMobile.ScheduleTimeWithZone.create({
id: 1,
date: '2014-03-05',
hour: '17',
minute: '10',
timezone: 'Auckland'
})
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment