debian-mirror-gitlab/lib/gitlab/timeless.rb
2023-07-09 08:55:56 +05:30

14 lines
296 B
Ruby

# 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