Skip to content

Namespaced Models #151

@2009

Description

@2009

I'm migrating from fast_jsonapi and before relationships with a namespaced model would resolve to a serializer that included the namespace, but now they get ignored.

Given the following serializer:

class Serializers::OrderSerializer
  has_many :items, polymorphic: true
end

If an item had a class Order::Book it would resolve to Serializers::Order::BookSerializer, but now it resolves to just Serializers::BookSerializer.

Was this an intended change? I would expect the previous behaviour, if I also had un-namespaced Book class and serializer I would be forced to manually handle resolving all serializers for items.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions