Update method and route
This commit is contained in:
parent
f011f038cd
commit
fa6593b226
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue