diff options
-rw-r--r-- | app/controllers/projects/labels_controller.rb | 4 | ||||
-rw-r--r-- | config/routes.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/labels_controller.rb b/app/controllers/projects/labels_controller.rb index 13f634fdd0e..885dd0eb45d 100644 --- a/app/controllers/projects/labels_controller.rb +++ b/app/controllers/projects/labels_controller.rb @@ -5,7 +5,7 @@ class Projects::LabelsController < Projects::ApplicationController before_action :label, only: [:edit, :update, :destroy] before_action :authorize_read_label! before_action :authorize_admin_labels!, only: [ - :new, :create, :edit, :update, :generate, :destroy + :new, :create, :edit, :update, :generate, :destroy, :remove_priority ] respond_to :js, :html @@ -83,7 +83,7 @@ class Projects::LabelsController < Projects::ApplicationController end end - def set_sorting + def set_priorities Label.transaction do params[:label_ids].each_with_index do |label_id, index| label = @project.labels.find_by_id(label_id) diff --git a/config/routes.rb b/config/routes.rb index 93ff825d7b2..240dcc74b06 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -719,7 +719,7 @@ Rails.application.routes.draw do resources :labels, constraints: { id: /\d+/ } do collection do post :generate - post :set_sorting + post :set_priorities end member do |