summaryrefslogtreecommitdiff
path: root/app/helpers/blob_helper.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 03:06:12 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 03:06:12 +0000
commitf155cc9034f2247c5d368f9b0212ad44248b0c5e (patch)
tree902480293b665d74a337aeae6a0521104f561988 /app/helpers/blob_helper.rb
parentc920712fab6abdc37de9444e6bbcd170c295b21a (diff)
downloadgitlab-ce-f155cc9034f2247c5d368f9b0212ad44248b0c5e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r--app/helpers/blob_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb
index 6d1ec16b0c2..5c24b0e1704 100644
--- a/app/helpers/blob_helper.rb
+++ b/app/helpers/blob_helper.rb
@@ -32,6 +32,14 @@ module BlobHelper
File.join(segments)
end
+ def ide_fork_and_edit_path(project = @project, ref = @ref, path = @path, options = {})
+ if current_user
+ project_forks_path(project,
+ namespace_key: current_user&.namespace&.id,
+ continue: edit_blob_fork_params(ide_edit_path(project, ref, path)))
+ end
+ end
+
def encode_ide_path(path)
url_encode(path).gsub('%2F', '/')
end