diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-04-20 00:37:44 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-04-20 00:37:44 +0000 |
commit | d170133bded904603833f1b9e2727def3805962d (patch) | |
tree | a1c1e1f9973b43a5ff2482d4e1b91b219c5ac3af /app/controllers/projects/tree_controller.rb | |
parent | bfb635a4afea60751a44e6454f9c36850b5342c9 (diff) | |
download | gitlab-ce-d170133bded904603833f1b9e2727def3805962d.tar.gz |
Refactor changing files in web UI
Diffstat (limited to 'app/controllers/projects/tree_controller.rb')
-rw-r--r-- | app/controllers/projects/tree_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/tree_controller.rb b/app/controllers/projects/tree_controller.rb index 637b61504d8..5e2182c883e 100644 --- a/app/controllers/projects/tree_controller.rb +++ b/app/controllers/projects/tree_controller.rb @@ -34,16 +34,16 @@ class Projects::TreeController < Projects::ApplicationController def create_dir return render_404 unless @commit_params.values.all? - update_ref + set_start_branch_to_branch_name create_commit(Files::CreateDirService, success_notice: "The directory has been successfully created.", - success_path: namespace_project_tree_path(@project.namespace, @project, File.join(@target_branch, @dir_name)), + success_path: namespace_project_tree_path(@project.namespace, @project, File.join(@branch_name, @dir_name)), failure_path: namespace_project_tree_path(@project.namespace, @project, @ref)) end private def assign_dir_vars - @target_branch = params[:target_branch] + @branch_name = params[:branch_name] @dir_name = File.join(@path, params[:dir_name]) @commit_params = { |