diff options
Diffstat (limited to 'app/controllers/projects/protected_refs_controller.rb')
-rw-r--r-- | app/controllers/projects/protected_refs_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/projects/protected_refs_controller.rb b/app/controllers/projects/protected_refs_controller.rb index 69a540158c6..442110d1044 100644 --- a/app/controllers/projects/protected_refs_controller.rb +++ b/app/controllers/projects/protected_refs_controller.rb @@ -22,7 +22,10 @@ class Projects::ProtectedRefsController < Projects::ApplicationController flash[:alert] = protected_ref.errors.full_messages.join(', ').html_safe end - redirect_to_repository_settings(@project, anchor: params[:update_section]) + respond_to do |format| + format.html { redirect_to_repository_settings(@project, anchor: params[:update_section]) } + format.json { head :ok } + end end def show |