Merge pull request #1247 from beauby/jsonapi-toplevel-links

Add support for toplevel JSON API links.
This commit is contained in:
João Moura
2015-10-10 17:52:08 -03:00
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