kurko / ember-indexeddb-adapter

Ember Data IndexedDB Adapter
MIT License
43 stars 16 forks source link

toString vs typeKey #2

Closed drewcovi closed 10 years ago

drewcovi commented 10 years ago

Hey Alexandre -

Any reason we can't use typeKey rather than toString to establish modelName ?

I'm using Ember App Kit, and the toString method fails every time, seems typeKey is the new approach I see throughout Ember Data these days.

kurko commented 10 years ago

Interesting. Ember Data beta.6 works fine with toString. I need to look into that.

drewcovi commented 10 years ago

I think it's more tied to the use of Ember App Kit's ES6 approach, the toString method results in:

"( DS.Model )" I believe.

This may not be something you need to worry about but rather something the Ember Data team looks into. I just extended DS.Model to map the toString method to typeKey.

But yeah, like I mentioned, it seems the RestAdapter now uses typeKey instead, or so I recall.

kurko commented 10 years ago

@drewcovi I and everyone using this would be infinitely grateful if you could send a PR to use typeKey :)