ruby-grape / grape-active_model_serializers

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

Namespace inferred serializer resolution. #60

Closed drn closed 8 years ago

drn commented 8 years ago

This reimplements the changes in pull https://github.com/ruby-grape/grape-active_model_serializers/pull/58 on top of the refactor of pull https://github.com/ruby-grape/grape-active_model_serializers/pull/59.

This borrows some logic from the serializer resolution logic in active_model_serializers. Given that active_model_serializers no longer supports the namespace option passed into the serializer_for method, in order to support namespace inference we need to reuse some of their serializer_for logic in grape-asm. I will work with the asm team to add back support for that option, but in order to support the existing 0.10.x asm versions, we need to reimplement some of that logic.

dblock commented 8 years ago

Merging. See my comment on Rubocop, can address later.