summaryrefslogtreecommitdiff
path: root/app/controllers/projects/blob_controller.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-16 18:24:56 -0600
committerDouwe Maan <douwe@selenight.nl>2017-03-02 17:41:05 -0600
commit6cc4cf1e151fb8da16796d7bbab16bc8a1ac08b6 (patch)
treedbc7105aa4ecd6498a9354ad6d9c141fb93d277f /app/controllers/projects/blob_controller.rb
parentefff35e96873bd3bea0afceb1d3cd102280813f5 (diff)
downloadgitlab-ce-6cc4cf1e151fb8da16796d7bbab16bc8a1ac08b6.tar.gz
Fix cherry-picking or reverting through an MR
Diffstat (limited to 'app/controllers/projects/blob_controller.rb')
-rw-r--r--app/controllers/projects/blob_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb
index f9a5ef46786..21ed0660762 100644
--- a/app/controllers/projects/blob_controller.rb
+++ b/app/controllers/projects/blob_controller.rb
@@ -24,7 +24,7 @@ class Projects::BlobController < Projects::ApplicationController
def create
create_commit(Files::CreateService, success_notice: "The file has been successfully created.",
- success_path: namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @file_path)),
+ success_path: -> { namespace_project_blob_path(@project.namespace, @project, File.join(@target_branch, @file_path)) },
failure_view: :new,
failure_path: namespace_project_new_blob_path(@project.namespace, @project, @ref))
end
@@ -40,7 +40,7 @@ class Projects::BlobController < Projects::ApplicationController
def update
@path = params[:file_path] if params[:file_path].present?
- create_commit(Files::UpdateService, success_path: after_edit_path,
+ create_commit(Files::UpdateService, success_path: -> { after_edit_path },
failure_view: :edit,
failure_path: namespace_project_blob_path(@project.namespace, @project, @id))
@@ -62,7 +62,7 @@ class Projects::BlobController < Projects::ApplicationController
def destroy
create_commit(Files::DestroyService, success_notice: "The file has been successfully deleted.",
- success_path: namespace_project_tree_path(@project.namespace, @project, @target_branch),
+ success_path: -> { namespace_project_tree_path(@project.namespace, @project, @target_branch) },
failure_view: :show,
failure_path: namespace_project_blob_path(@project.namespace, @project, @id))
end