Skip to content

Instantly share code, notes, and snippets.

@SweeD
Created January 16, 2013 14:17
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 SweeD/4547376 to your computer and use it in GitHub Desktop.
Save SweeD/4547376 to your computer and use it in GitHub Desktop.
Sad try to to use a DS.Model and DS.Store up and running.
When I try to find a model in the console, i get an error.
MyApp.User.find(98)
> TypeError: Object Ember has no method 'merge'
MyApp.Store = DS.Store.extend
revision: 11
attr = DS.attr
MyApp.User = DS.Model.extend
alias: attr('string')
email: attr('string')
birthday: attr('date')
sex: attr('string')
countryCode: attr('string')
firstName: attr('string')
lastName: attr('string')
addresses: DS.hasMany('GleichklangWeb.Address')
fullName: (->
return "#{@get('firstName')} #{@get('lastName')}"
).property('firstName', 'lastName')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment