0

I'm trying to run a project using new Active Model Serializer development (0.10rc3),

What I found from logs - possibility to embed ids of relationship has been removed.

In earlier versions of AMS it was possible to declare:

class CompanySerializer < ActiveModel::Serializer
  embed :ids, include: true
  attributes :id, :name

  has_many :employees
end

Right now it should be achieved using :include directive to serialization adapter, but it's not clear from documentation how to do it for a JSON adapter.

Could anybody advise, please?

Mehal
  • 398
  • 3
  • 11

1 Answers1

0

There is an ongoing discussion about adding a sideloading json adapter to AMS. There is also an ongoing discussion about building legacy adapters to ease the transition.

beauby
  • 550
  • 3
  • 11