diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2019-06-24 11:51:34 +0200 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2019-06-24 11:51:34 +0200 |
commit | 4189ffe2142e0a0969a3f28ec55e069c3b5abb9f (patch) | |
tree | abb30e42e8317a53dfe72c5cfaa7ddfd28ce47ae /app | |
parent | da4702493d046e6de24c0a071b0162818e9d990c (diff) | |
download | gitlab-ce-4189ffe2142e0a0969a3f28ec55e069c3b5abb9f.tar.gz |
Added labels_hook_attrs methodfix-labels-in-hooks
Based on review comment fetching labels hook_attrs is now
wrapped in an issue's model method.
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 6da6fbe55cb..30e29911758 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -254,6 +254,10 @@ class Issue < ApplicationRecord merge_requests_closing_issues.count end + def labels_hook_attrs + labels.map(&:hook_attrs) + end + private def ensure_metrics |