Last active
August 29, 2015 13:57
-
-
Save ap4y/9880944 to your computer and use it in GitHub Desktop.
Ember Data beta 7 embedded records
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CarnivalMobile.Message = DS.Model.extend({ | |
title: DS.attr('string'), | |
notifications: DS.hasMany('notification') | |
}); | |
CarnivalMobile.MessageSerializer = DS.ActiveModelSerializer.extend(DS.EmbeddedRecordsMixin, { | |
attrs: { | |
notifications: { embedded: 'always' } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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