Skip to content

Commit 6fd6fc6

Browse files
authored
Merge pull request #735 from alexandermeindl/devel
#734 fix protected_branches list and sort order
2 parents fce3d41 + 192cca5 commit 6fd6fc6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: app/controllers/repository_protected_branches_controller.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ def clone
4747
end
4848

4949
def sort
50-
params[:repository_protected_branche].each_with_index do |id, index|
50+
params[:protected_branch].each_with_index do |id, index|
5151
@repository.protected_branches.where(id: id).update_all(position: index + 1)
5252
end
5353
# Update Gitolite repository
5454
call_use_case
55-
render nothing: true
55+
head :ok
5656
end
5757

5858
private

Diff for: app/views/repository_protected_branches/index.html.slim

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ div
1010
= link_to "(#{l(:label_gitolite_documentation)})", 'https://gitolite.com/gitolite/conf.html#rules', class: 'external'
1111

1212
- if @repository_protected_branches.any?
13-
table#protected_branches.table.table-hover data="update-url: #{sort_repository_protected_branches_url}", style: "opacity: #{@repository.protected_branches_enabled? ? '1' : '0.5'};" }
13+
table#protected_branches.table.table-hover data-update-url="#{sort_repository_protected_branches_url}" style="opacity: #{@repository.protected_branches_enabled? ? '1' : '0.5'};"
1414
thead
1515
tr
1616
th

0 commit comments

Comments
 (0)