Sha256: 134c445915dbcf6a0212112edebadd5feed5fed1773e4aecfe4f8efab00f9722

Contents?: true

Size: 446 Bytes

Versions: 2

Compression:

Stored size: 446 Bytes

Contents

# frozen_string_literal: true

module ActiveModelSerializers
  module Adapter
    class Attributes < Base
      def serializable_hash(options = nil)
        options = serialization_options(options)
        options[:fields] ||= instance_options[:fields]
        serialized_hash = serializer.serializable_hash(instance_options, options, self)

        self.class.transform_key_casing!(serialized_hash, instance_options)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
active_model_serializers_custom-0.10.90 lib/active_model_serializers/adapter/attributes.rb
active_model_serializers-0.10.9 lib/active_model_serializers/adapter/attributes.rb