summaryrefslogtreecommitdiff
path: root/app/controllers/projects/branches_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/branches_controller.rb')
-rw-r--r--app/controllers/projects/branches_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb
index 6264f10ce2d..27969cb1a75 100644
--- a/app/controllers/projects/branches_controller.rb
+++ b/app/controllers/projects/branches_controller.rb
@@ -111,7 +111,7 @@ class Projects::BranchesController < Projects::ApplicationController
flash_type = result.error? ? :alert : :notice
flash[flash_type] = result.message
- redirect_to project_branches_path(@project), status: :see_other
+ redirect_back_or_default(default: project_branches_path(@project), options: { status: :see_other })
end
format.js { head result.http_status }