summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-08-19 16:17:14 +0100
committerSean McGivern <sean@gitlab.com>2016-08-19 16:17:14 +0100
commit9cf6d4514b8f9ff312ab45102127fce97050630c (patch)
treeb6606a3c9055109d0d1e5ddb75773776e14ede8a /app/helpers
parent8db088ccc726996bdcda74373d9ce855dedf5bd5 (diff)
downloadgitlab-ce-9cf6d4514b8f9ff312ab45102127fce97050630c.tar.gz
Move editor paths to helper
Diffstat (limited to 'app/helpers')
-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 9ea03720c1e..e13b7cdd707 100644
--- a/app/helpers/blob_helper.rb
+++ b/app/helpers/blob_helper.rb
@@ -217,4 +217,12 @@ module BlobHelper
def gitlab_ci_ymls
@gitlab_ci_ymls ||= Gitlab::Template::GitlabCiYmlTemplate.dropdown_names
end
+
+ def blob_editor_paths
+ {
+ 'relative-url-root' => Rails.application.config.relative_url_root,
+ 'assets-prefix' => Gitlab::Application.config.assets.prefix,
+ 'blob-language' => @blob && @blob.language.try(:ace_mode)
+ }
+ end
end