Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
fa6593b2
Commit
fa6593b2
authored
Jun 02, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update method and route
parent
f011f038
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/projects/labels_controller.rb
app/controllers/projects/labels_controller.rb
+2
-2
config/routes.rb
config/routes.rb
+1
-1
No files found.
app/controllers/projects/labels_controller.rb
View file @
fa6593b2
...
...
@@ -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
)
...
...
config/routes.rb
View file @
fa6593b2
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment