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/group_label.rb')
-rw-r--r--app/models/group_label.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/group_label.rb b/app/models/group_label.rb
index 0d2eb524929..46e56166951 100644
--- a/app/models/group_label.rb
+++ b/app/models/group_label.rb
@@ -11,4 +11,8 @@ class GroupLabel < Label
def subject_foreign_key
'group_id'
end
+
+ def preloaded_parent_container
+ association(:group).loaded? ? group : parent_container
+ end
end