class ActiveModelSerializers::Adapter::JsonApi::Relationship
def links_for(association)
def links_for(association) association.links.each_with_object({}) do |(key, value), hash| result = Link.new(parent_serializer, value).as_json hash[key] = result if result end end