Sha256: 05c8bceb341126c7110db9b6587621033a19cc31c4a80941fc6bc674c5022e15

Contents?: true

Size: 986 Bytes

Versions: 5

Compression:

Stored size: 986 Bytes

Contents

# frozen_string_literal: true

module PaperTrailAssociationTracking
  module PaperTrail
    module ClassMethods
      def transaction?
        ::ActiveRecord::Base.connection.open_transactions.positive?
      end

      # @deprecated
      def clear_transaction_id
        ::ActiveSupport::Deprecation.warn(
          "PaperTrail.clear_transaction_id is deprecated, use PaperTrail.request.clear_transaction_id",
          caller(1)
        )
        request.clear_transaction_id
      end

      # @deprecated
      def transaction_id
        ::ActiveSupport::Deprecation.warn(
          "PaperTrail.transaction_id is deprecated without replacement.",
          caller(1)
        )
        request.transaction_id
      end

      # @deprecated
      def transaction_id=(id)
        ::ActiveSupport::Deprecation.warn(
          "PaperTrail.transaction_id= is deprecated without replacement.",
          caller(1)
        )
        request.transaction_id = id
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
paper_trail-association_tracking-2.0.0 lib/paper_trail_association_tracking/paper_trail.rb
paper_trail-association_tracking-1.1.1 lib/paper_trail_association_tracking/paper_trail.rb
paper_trail-association_tracking-1.1.0 lib/paper_trail_association_tracking/paper_trail.rb
paper_trail-association_tracking-1.0.0 lib/paper_trail_association_tracking/paper_trail.rb
paper_trail-association_tracking-0.0.1 lib/paper_trail_association_tracking/paper_trail.rb