Sha256: 948b916f63269a89a66d4058360e020588f0ca5ede3df52664bd8f7ebd7d2bd4

Contents?: true

Size: 231 Bytes

Versions: 5

Compression:

Stored size: 231 Bytes

Contents

# frozen_string_literal: true

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
paper_trail-association_tracking-2.2.1 lib/paper_trail_association_tracking/paper_trail.rb
paper_trail-association_tracking-2.2.0 lib/paper_trail_association_tracking/paper_trail.rb
paper_trail-association_tracking-2.1.3 lib/paper_trail_association_tracking/paper_trail.rb
paper_trail-association_tracking-2.1.1 lib/paper_trail_association_tracking/paper_trail.rb
paper_trail-association_tracking-2.1.0 lib/paper_trail_association_tracking/paper_trail.rb