Welcome to mirror list, hosted at ThFree Co, Russian Federation.

timeless.rb « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 55cd9d7e6fb0be069796a3f7c81b8085d1e202d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

module Gitlab
  module Timeless
    def self.timeless(model)
      original_record_timestamps = model.record_timestamps
      model.record_timestamps = false

      yield model
    ensure
      model.record_timestamps = original_record_timestamps
    end
  end
end