Sha256: c5be405d289069ff40c6f7538eb97ce0fc783dfaf2d3be70495fdb15a2a4caba

Contents?: true

Size: 439 Bytes

Versions: 2

Compression:

Stored size: 439 Bytes

Contents

# frozen_string_literal: true

Datadog::DI::Serializer.register(condition: lambda { |value| ActiveRecord::Base === value }) do |serializer, value, name:, depth:| # steep:ignore
  # steep thinks all of the arguments are nil here
  # steep:ignore:start
  value_to_serialize = {
    attributes: value.attributes,
  }
  serializer.serialize_value(value_to_serialize, depth: depth ? depth - 1 : nil, type: value.class)
  # steep:ignore:end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
datadog-2.7.1 lib/datadog/di/contrib/active_record.rb
datadog-2.7.0 lib/datadog/di/contrib/active_record.rb