-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use model's serializer "transformFor" method #5
base: master
Are you sure you want to change the base?
Conversation
- to support all transform's types (like in ember-data-model-fragments addon)
@mpirio |
@offirgolan |
I am also using I tried making the changes in this PR to my code for testing, and the transform is returned from getTransform successfully, but I end up with a different error on the next line when the fragment itself is getting serialized;
I am not sure if this is a problem with this addon or ember-data-model-fragments... Thoughts? |
@mpirio I think we should have a fallback if |
@Techn1x I don't know if it's a problem in "ember-data-copyable" or in "ember-data-model-fragments" ... Have you tried the latest version 0.2.2: if you use fragments, this version uses the Ember.Copyable copy() method defined in fragments. |
@offirgolan Yes you're right. I look at this :) |
@mpirio Thanks a lot! That works well now! Unfortunately I also have yet another (somewhat unrelated) issue. Some of my model attributes are moment objects, and moment objects don't implement Ember.Copyable (looks like you've already seen it though ;) ) |
The addon need to use model's serializer "transformFor" method to support all transform's types (like in ember-data-model-fragments addon).