diff options
| author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-11-14 20:42:44 -0200 |
|---|---|---|
| committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-11-17 15:10:13 -0200 |
| commit | 198fe1bfc281ed465b94bb0b0a077f607d3d9fc7 (patch) | |
| tree | 30cbf8ae9c7c9629f967ed58e343261e4eb13991 /app/controllers/groups | |
| parent | 0aac2e0706cd767993148826d723aa3641cbb2a4 (diff) | |
| download | gitlab-ce-198fe1bfc281ed465b94bb0b0a077f607d3d9fc7.tar.gz | |
Add toggle_subscription action to Groups::LabelsController
Diffstat (limited to 'app/controllers/groups')
| -rw-r--r-- | app/controllers/groups/labels_controller.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/groups/labels_controller.rb b/app/controllers/groups/labels_controller.rb index 29528b2cfaa..587898a8634 100644 --- a/app/controllers/groups/labels_controller.rb +++ b/app/controllers/groups/labels_controller.rb @@ -1,4 +1,6 @@ class Groups::LabelsController < Groups::ApplicationController + include ToggleSubscriptionAction + before_action :label, only: [:edit, :update, :destroy] before_action :authorize_admin_labels!, only: [:new, :create, :edit, :update, :destroy] before_action :save_previous_label_path, only: [:edit] @@ -69,6 +71,11 @@ class Groups::LabelsController < Groups::ApplicationController def label @label ||= @group.labels.find(params[:id]) end + alias_method :subscribable_resource, :label + + def subscribable_project + nil + end def label_params params.require(:label).permit(:title, :description, :color) |
