gitlab-org--gitlab-foss/lib/gitlab/with_request_store.rb

13 lines
215 B
Ruby

# frozen_string_literal: true
module Gitlab
module WithRequestStore
def with_request_store
RequestStore.begin!
yield
ensure
RequestStore.end!
RequestStore.clear!
end
end
end