ruby-grape / grape-active_model_serializers

User active_model_serializers with Grape
MIT License
140 stars 68 forks source link

Changing adapter in AMS is not affected to output #52

Closed bypotatoes closed 8 years ago

bypotatoes commented 8 years ago

active_model_serializers-0.10.0 grape-active_model_serializers (1.3.2)

I'd like to have :json as the default adapter for AMS, so I've initialized it:

ActiveModelSerializers.config.adapter = :json

But nothing was changed and I've started looking into source. As I've found grape-AMS using serializer.new here to create serialized_resource. But this approach does not allow us to apply adapter, include meta etc. For that we should user ActiveModelSerializers::SerializableResource as here.

dblock commented 8 years ago

This seems sensible, we'd take a pull request.

fogisland commented 8 years ago

Hello, is there any progress about this issue? I wanna AMS to generate json-api but it not works:

ActiveModelSerializers.config.adapter = :json_api

Thanks!

dblock commented 8 years ago

@fogisland I am not working on it.

drn commented 8 years ago

@bypotatoes & @fogisland - can you try to run this against master? I merged in a few commits that should solve this issue.

drn commented 8 years ago

closing this as this should be fixed on master. please reopen if it is not

ouabing commented 8 years ago

Hi guys, would you please bump the version so we can use a fixed version of the gem to solve the problem? Using master source for our production is somewhat risky I think. Thanks!

drn commented 8 years ago

I was planning on doing some work before we released 1.5.0 but I can take care of that sometime this week and release a version. I'll post an update here when I push up a release

ouabing commented 8 years ago

@drn Thank you!

drn commented 8 years ago

@ouabing - v1.5.0 has been released