Add support for toplevel JSON API links.

This commit is contained in:
Lucas Hosseini
2015-10-06 19:44:44 +02:00
parent d02cd30fe5
commit 54303b6290
3 changed files with 38 additions and 1 deletions

View File

@@ -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