Skip to content

Instantly share code, notes, and snippets.

@cloke
Created July 12, 2013 00:15
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 cloke/5980400 to your computer and use it in GitHub Desktop.
Save cloke/5980400 to your computer and use it in GitHub Desktop.
#this must run before application.create.
DS.RESTAdapter.map 'App.ParentModel',
foos: { embedded: 'always' } #has many
bars: { embedded: 'always' } #has one aka belongsTo
App.ParentModel = DS.Model.extend
foos: DS.hasMany App.Foo
bars: DS.belongsTo App.Bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment