summaryrefslogtreecommitdiff
path: root/app/helpers/blob_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r--app/helpers/blob_helper.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb
index 615c834c529..2eff87ae0ec 100644
--- a/app/helpers/blob_helper.rb
+++ b/app/helpers/blob_helper.rb
@@ -41,7 +41,7 @@ module BlobHelper
end
def encode_ide_path(path)
- url_encode(path).gsub('%2F', '/')
+ ERB::Util.url_encode(path).gsub('%2F', '/')
end
def edit_blob_button(project = @project, ref = @ref, path = @path, options = {})
@@ -375,4 +375,9 @@ module BlobHelper
def human_access
@project.team.human_max_access(current_user&.id).try(:downcase)
end
+
+ def editing_ci_config?
+ @path.to_s.end_with?(Ci::Pipeline::CONFIG_EXTENSION) ||
+ @path.to_s == @project.ci_config_path_or_default
+ end
end