debian-mirror-gitlab/lib/gitlab/marginalia/active_record_instrumentation.rb
2020-01-01 13:55:28 +05:30

13 lines
288 B
Ruby

# frozen_string_literal: true
# Patch to annotate sql only when the feature is enabled.
module Gitlab
module Marginalia
module ActiveRecordInstrumentation
def annotate_sql(sql)
Gitlab::Marginalia.cached_feature_enabled? ? super(sql) : sql
end
end
end
end