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

@@ -1,7 +1,7 @@
require 'set'
module ActiveModel
class SerializableResource
ADAPTER_OPTION_KEYS = Set.new([:include, :fields, :adapter, :meta, :meta_key])
ADAPTER_OPTION_KEYS = Set.new([:include, :fields, :adapter, :meta, :meta_key, :links])
# Primary interface to composing a resource with a serializer and adapter.
# @return the serializable_resource, ready for #as_json/#to_json/#serializable_hash.