staugaard / ember-resource

This project has moved. The canonical repository is now located at: https://github.com/zendesk/ember-resource
https://github.com/zendesk/ember-resource
Apache License 2.0
122 stars 27 forks source link

Uncaught TypeError: Cannot call method 'property' of undefined #47

Open arasbm opened 12 years ago

arasbm commented 12 years ago

Hi, I am trying to define Resource objects to connect to an API in the following format:

{
  blocks: [
    {
      id: 1,
      name: "Search Action"
    },
    {
      id: 2,
      name: "Refresh Action"
    }
  ]
}

When I use an API in this format with a Resource I get the error in title

uncaught TypeError: Cannot call method 'property' of undefined

I have put more details about this problem in these SO questions: http://stackoverflow.com/questions/12415302/type-error-using-ember-resource-with-ember-js-and-rails http://stackoverflow.com/questions/12443125/how-can-i-connect-array-of-objects-returned-from-an-api-to-ember-resource

I now suspect it may be a bug, so decided to report here. But if it is something I am doing wrong, I would appreciate any help.