summaryrefslogtreecommitdiff
path: root/app/controllers/projects/protected_refs_controller.rb
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-08-08 01:17:43 -0500
committerMike Greiling <mike@pixelcog.com>2018-08-08 01:17:43 -0500
commitc90cfbd4eae64d683f04aa03f0135da50ac5b761 (patch)
tree6dad59655f79343a9ed97e625d35a95d8bd69432 /app/controllers/projects/protected_refs_controller.rb
parent9c0f52714ce9b406a2775a0487843d80e596d9a6 (diff)
downloadgitlab-ce-c90cfbd4eae64d683f04aa03f0135da50ac5b761.tar.gz
ensure all project repository settings panels remain open after form submission
Diffstat (limited to 'app/controllers/projects/protected_refs_controller.rb')
-rw-r--r--app/controllers/projects/protected_refs_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/protected_refs_controller.rb b/app/controllers/projects/protected_refs_controller.rb
index 9e757a8d25f..cc62ce2f11b 100644
--- a/app/controllers/projects/protected_refs_controller.rb
+++ b/app/controllers/projects/protected_refs_controller.rb
@@ -19,7 +19,7 @@ class Projects::ProtectedRefsController < Projects::ApplicationController
flash[:alert] = protected_ref.errors.full_messages.join(', ').html_safe
end
- redirect_to_repository_settings(@project)
+ redirect_to_repository_settings(@project, anchor: params[:update_section])
end
def show
@@ -40,7 +40,7 @@ class Projects::ProtectedRefsController < Projects::ApplicationController
destroy_service_class.new(@project, current_user).execute(@protected_ref)
respond_to do |format|
- format.html { redirect_to_repository_settings(@project) }
+ format.html { redirect_to_repository_settings(@project, anchor: params[:update_section]) }
format.js { head :ok }
end
end