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:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-11-01 05:03:38 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-11-17 20:10:13 +0300
commitd45c6eca2750abd5614be41a6fe01033f655ef1e (patch)
treef2d52c31f08286a6c14a86b1fefdde09d20b2bd8 /app/helpers/labels_helper.rb
parent38f16582725709ee89c7eeadd4415ed3e2fa57dc (diff)
Refactoring label subscription status to accept a project
Diffstat (limited to 'app/helpers/labels_helper.rb')
-rw-r--r--app/helpers/labels_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/labels_helper.rb b/app/helpers/labels_helper.rb
index 221a84b042f..e1db6007c09 100644
--- a/app/helpers/labels_helper.rb
+++ b/app/helpers/labels_helper.rb
@@ -148,10 +148,10 @@ module LabelsHelper
end
end
- def label_subscription_status(label)
+ def label_subscription_status(label, project)
case label
when GroupLabel then 'Subscribing to group labels is currently not supported.'
- when ProjectLabel then label.subscribed?(current_user) ? 'subscribed' : 'unsubscribed'
+ when ProjectLabel then label.subscribed?(current_user, project) ? 'subscribed' : 'unsubscribed'
end
end