class ActiveModel::Serializer::Associations::HasOne

def embed_key

def embed_key
  if key = option(:embed_key)
    key
  else
    :id
  end
end