Skip to content

Overriding adapter  #1039

@bolshakov

Description

@bolshakov

I can override adapter for specific action this way

render json: movie, adapter: :json_api

This is not convenient enough if you use your own adapter, since adapter string is converted to adapter class in the ActiveModel namespace:

"ActiveModel::Serializer::Adapter::#{adapter_name}".safe_constantize

My suggestion is to pass adapter as a class instead of symbol, or allow to pass both class an symbol.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions