diff options
author | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-07-01 16:32:56 +0100 |
---|---|---|
committer | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-07-12 15:22:17 +0100 |
commit | b34310ae9e9d3d4331b38f1acf4a51e2247b76ac (patch) | |
tree | ba7e771559e742ccfbfad74088dd01dc7367df3e /app/controllers/projects | |
parent | 850bb6db2facf570a7e0933bbf555f764aeac601 (diff) | |
download | gitlab-ce-b34310ae9e9d3d4331b38f1acf4a51e2247b76ac.tar.gz |
implements the form for renaming the new filename on the file edit page
Diffstat (limited to 'app/controllers/projects')
-rw-r--r-- | app/controllers/projects/blob_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index 5356fdf010d..bcd436f2429 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -43,7 +43,8 @@ class Projects::BlobController < Projects::ApplicationController diffs_namespace_project_merge_request_path(from_merge_request.target_project.namespace, from_merge_request.target_project, from_merge_request) + "#file-path-#{hexdigest(@path)}" else - namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @path)) + # params[:file_name] stores the new name for the file + namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, params[:file_name])) end create_commit(Files::UpdateService, success_path: after_edit_path, |