Module: Roar::JSON::JSONAPI::Fragment
- Defined in:
- lib/roar/json/json_api.rb
Constant Summary collapse
- Included =
->(document, included, ) do return unless included and included.any? return if [:included] == false type_and_id_seen = Set.new included = included.select do |object| type_and_id_seen.add? [object[:type], object[:id]] end document[:included] = included end
- Links =
->(document, links, ) do document[:links] = links if links.any? end