rails-api/active_model_serializers

View on GitHub
lib/active_model/serializer/adapter/json_api.rb

Summary

Maintainability
A
15 mins
Test Coverage
# frozen_string_literal: true

module ActiveModel
  class Serializer
    module Adapter
      class JsonApi < DelegateClass(ActiveModelSerializers::Adapter::JsonApi)
        def initialize(serializer, options = {})
          super(ActiveModelSerializers::Adapter::JsonApi.new(serializer, options))
        end
        class << self
          extend ActiveModelSerializers::Deprecate
          deprecate :new, 'ActiveModelSerializers::Adapter::JsonApi.new'
        end
      end
    end
  end
end