Skip to content

Custom type for json-api adapter #1209

Closed
@youroff

Description

@youroff

Wouldn't it make more sense to have type set after serializer name, not the model class?
https://github.com/rails-api/active_model_serializers/blob/master/lib/active_model/serializer/adapter/json_api.rb#L73-L79
I think that's the point of having multiple serializers for different occasions. In my example I have ProfileSerializer, but main object there is obviously User, however I expect Ember (which I use on front end) to understand that it's profile model came.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions