Sha256: c1cb94bc4155ff23cd01b7bb9964083226f488220498564de854c0696ca31f2b

Contents?: true

Size: 389 Bytes

Versions: 3

Compression:

Stored size: 389 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module WrapsResultInDBTransaction
        class Middleware < MethodChainMiddleware
          intended_for :result, scope: :class, entity: :service

          def next(...)
            ::ActiveRecord::Base.transaction { chain.next(...) }
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/service/plugins/wraps_result_in_d_b_transaction/middleware.rb
convenient_service-0.19.0 lib/convenient_service/service/plugins/wraps_result_in_d_b_transaction/middleware.rb
convenient_service-0.18.0 lib/convenient_service/service/plugins/wraps_result_in_d_b_transaction/middleware.rb