Use model's serializer "transformFor" method#5
Use model's serializer "transformFor" method#5mpirio wants to merge 3 commits intooffirgolan:masterfrom
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).