mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Merge pull request #1247 from beauby/jsonapi-toplevel-links
Add support for toplevel JSON API links.
This commit is contained in:
@@ -65,6 +65,11 @@ module ActiveModel
|
||||
|
||||
ApiObjects::JsonApi.add!(hash)
|
||||
|
||||
if instance_options[:links]
|
||||
hash[:links] ||= {}
|
||||
hash[:links].update(instance_options[:links])
|
||||
end
|
||||
|
||||
hash
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user