Module: ActiveModelSerializers::Jsonapi::ControllerSupport

Defined in:
lib/active_model_serializers/register_jsonapi_renderer.rb

Instance Method Summary collapse

Instance Method Details

#serialize_jsonapi(json, options) ⇒ Object



63
64
65
66
67
68
69
# File 'lib/active_model_serializers/register_jsonapi_renderer.rb', line 63

def serialize_jsonapi(json, options)
  options[:adapter] = :json_api
  options.fetch(:serialization_context) do
    options[:serialization_context] = ActiveModelSerializers::SerializationContext.new(request)
  end
  get_serializer(json, options)
end