diff options
author | Sean McGivern <sean@gitlab.com> | 2016-08-19 16:17:14 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-08-19 16:17:14 +0100 |
commit | 9cf6d4514b8f9ff312ab45102127fce97050630c (patch) | |
tree | b6606a3c9055109d0d1e5ddb75773776e14ede8a /app/helpers | |
parent | 8db088ccc726996bdcda74373d9ce855dedf5bd5 (diff) | |
download | gitlab-ce-9cf6d4514b8f9ff312ab45102127fce97050630c.tar.gz |
Move editor paths to helper
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/blob_helper.rb | 8 |
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 |