diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-11-01 20:02:58 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-11-17 20:10:13 +0300 |
commit | 4a29fde577a7d5d7c46ffff7c5feb79be23cdaa8 (patch) | |
tree | 31a014bba8e06b29175aea068631ece0a9f2ac78 /app/controllers/projects/labels_controller.rb | |
parent | b34c063ec428f1fd890a357a3f8ac7c129ee4c46 (diff) |
Allow users to subscribe to group labels at project-level
Diffstat (limited to 'app/controllers/projects/labels_controller.rb')
-rw-r--r-- | app/controllers/projects/labels_controller.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/projects/labels_controller.rb b/app/controllers/projects/labels_controller.rb index 93cfd8a7721..a65adf13568 100644 --- a/app/controllers/projects/labels_controller.rb +++ b/app/controllers/projects/labels_controller.rb @@ -3,7 +3,7 @@ class Projects::LabelsController < Projects::ApplicationController before_action :module_enabled before_action :label, only: [:edit, :update, :destroy] - before_action :find_labels, only: [:index, :set_priorities, :remove_priority] + before_action :find_labels, only: [:index, :set_priorities, :remove_priority, :toggle_subscription] before_action :authorize_read_label! before_action :authorize_admin_labels!, only: [:new, :create, :edit, :update, :generate, :destroy, :remove_priority, @@ -123,7 +123,10 @@ class Projects::LabelsController < Projects::ApplicationController def label @label ||= @project.labels.find(params[:id]) end - alias_method :subscribable_resource, :label + + def subscribable_resource + @available_labels.find(params[:id]) + end def subscribable_project @project |