Sha256: 89aac4662ee32f6d207ea2154ab28bd93285757fed512f6c0c64d84627ca0cff

Contents?: true

Size: 667 Bytes

Versions: 10

Compression:

Stored size: 667 Bytes

Contents

# frozen_string_literal: true

module PaperTrailAssociationTracking
  module Request
    module ClassMethods
      # @api private
      def clear_transaction_id
        self.transaction_id = nil
      end

      # @api private
      def transaction_id
        store[:transaction_id]
      end

      # @api private
      def transaction_id=(id)
        store[:transaction_id] = id
      end

      private

      def validate_public_options(options)
        if options.keys.include?(:transaction_id)
          raise ::PaperTrail::Request::InvalidOption, "Cannot set private option: transaction_id"
        else
          super
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
paper_trail-association_tracking-2.2.1 lib/paper_trail_association_tracking/request.rb
paper_trail-association_tracking-2.2.0 lib/paper_trail_association_tracking/request.rb
paper_trail-association_tracking-2.1.3 lib/paper_trail_association_tracking/request.rb
paper_trail-association_tracking-2.1.1 lib/paper_trail_association_tracking/request.rb
paper_trail-association_tracking-2.1.0 lib/paper_trail_association_tracking/request.rb
paper_trail-association_tracking-2.0.0 lib/paper_trail_association_tracking/request.rb
paper_trail-association_tracking-1.1.1 lib/paper_trail_association_tracking/request.rb
paper_trail-association_tracking-1.1.0 lib/paper_trail_association_tracking/request.rb
paper_trail-association_tracking-1.0.0 lib/paper_trail_association_tracking/request.rb
paper_trail-association_tracking-0.0.1 lib/paper_trail_association_tracking/request.rb