summaryrefslogtreecommitdiff
path: root/app/models/work_item.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-08 15:08:58 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-08 15:08:58 +0000
commit6c346448fd3e3443e04d96b90b9bdf9df2be1a3e (patch)
tree89d7a1a52ea0a8c2a064af42870bf21b7722b96e /app/models/work_item.rb
parentb0d4724e47f94c9b1b2676382084ef964200e3c1 (diff)
downloadgitlab-ce-6c346448fd3e3443e04d96b90b9bdf9df2be1a3e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/work_item.rb')
-rw-r--r--app/models/work_item.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/work_item.rb b/app/models/work_item.rb
index 642dd0736f5..aef9526f5be 100644
--- a/app/models/work_item.rb
+++ b/app/models/work_item.rb
@@ -1,6 +1,8 @@
# frozen_string_literal: true
class WorkItem < Issue
+ include Gitlab::Utils::StrongMemoize
+
self.table_name = 'issues'
self.inheritance_column = :_type_disabled
@@ -23,8 +25,10 @@ class WorkItem < Issue
end
def widgets
- work_item_type.widgets.map do |widget_class|
- widget_class.new(self)
+ strong_memoize(:widgets) do
+ work_item_type.widgets.map do |widget_class|
+ widget_class.new(self)
+ end
end
end