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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/concerns/disables_sti.rb')
-rw-r--r--app/models/concerns/disables_sti.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/models/concerns/disables_sti.rb b/app/models/concerns/disables_sti.rb
new file mode 100644
index 00000000000..ca6be5c43a8
--- /dev/null
+++ b/app/models/concerns/disables_sti.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+# Allow legacy usage of STI in models.
+#
+# The use of STI is disallowed otherwise and checked via
+# `spec/support/shared_examples/models/disable_sti_shared_examples.rb`.
+#
+# See https://docs.gitlab.com/ee/development/database/single_table_inheritance.html
+module DisablesSti
+ extend ActiveSupport::Concern
+
+ included do
+ class_attribute :allow_legacy_sti_class
+ end
+end