From a5e1624359d9960782cd76f24c6300aeb28a2746 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 23 May 2014 13:27:35 +0300 Subject: [PATCH] Redirect to tree view after branch created --- app/controllers/projects/branches_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb index 00811f1..e4c82d0 100644 --- a/app/controllers/projects/branches_controller.rb +++ b/app/controllers/projects/branches_controller.rb @@ -15,9 +15,9 @@ class Projects::BranchesController < Projects::ApplicationController end def create - CreateBranchService.new.execute(project, params[:branch_name], params[:ref], current_user) + @branch = CreateBranchService.new.execute(project, params[:branch_name], params[:ref], current_user) - redirect_to project_branches_path(@project) + redirect_to project_tree_path(@project, @branch.name) end def destroy -- libgit2 0.21.2