Ember.js Error: Object Photo Has No Method 'eachrelatedtype'
I’m trying to create some routes that filter out approved and disapproved photos from my model (based on a boolean value). Here’s my main photos, approved and disapproved route
Solution 1:
Sorry, I shouldn't answer in comments. Your stack trace happens in your custom serializer. You should probably post that code, as that's where the error lies.
But given the error, and the fact that eachRelatedType
is a static method, not an instance method, it's likely that you're calling it on an instance. Instead of photo.eachRelatedType()
, call photo.constructor.eachRelatedType()
or App.Photo.eachRelatedType()
.
EDIT: It seems you don't have a custom serializer. But Ember-Data never calls eachRelatedType
, it only defines it. What version of Ember-Data are you using?
EDIT2: It seems that this particular issue was solved by upgrading from Ember-Data 0.14. Although no exact cause for it is known. (Could have been an Ember-Data bug.)
Post a Comment for "Ember.js Error: Object Photo Has No Method 'eachrelatedtype'"