class ActiveModelSerializers::Adapter::JsonApi
def links_for(serializer)
related: link
self: 'http://example.com/etc',
{
structure:
itself.
a client to remove an `author` from an `article` without deleting the people resource
URL allows the client to directly manipulate the relationship. For example, it would allow
A `self` member’s value is a URL for the relationship itself (a "relationship URL"). This
in a resource's links object.
Relationships may be to-one or to-many. Relationships can be specified by including a member
A resource object **MAY** contain references to other resource objects ("relationships").
description:
related : link
self : URI
properties:
JSON Object
definition:
links
{http://jsonapi.org/format/#document-links Document Links}
def links_for(serializer) serializer._links.each_with_object({}) do |(name, value), hash| next if value.excluded?(serializer) result = Link.new(serializer, value.block).as_json hash[name] = result if result end end