diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-05-11 19:38:43 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-05-20 15:58:36 -0500 |
commit | 1f5fcb638d6b432d76a639ccc35acc94d8ae6ac7 (patch) | |
tree | 50f292932ed3d7ccb88c57da478cdbd6b7313d7e /app/helpers/blob_helper.rb | |
parent | fab9dbb3eba55151c34fc8bc171e3670e6c7c422 (diff) | |
download | gitlab-ce-1f5fcb638d6b432d76a639ccc35acc94d8ae6ac7.tar.gz |
Dropdown implementation
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r-- | app/helpers/blob_helper.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb index fb1b7649465..a3723d2c349 100644 --- a/app/helpers/blob_helper.rb +++ b/app/helpers/blob_helper.rb @@ -186,6 +186,12 @@ module BlobHelper end def gitignores_for_select - @gitignores_for_select ||= Gitlab::Gitignore.all + return @gitignores_for_select if defined?(@gitignores_for_select) + + @gitignores_for_select = { + Global: Gitlab::Gitignore.global.map{ |v| { text: v.name } }, + # Note that the key here doesn't cover it really + Languages: Gitlab::Gitignore.languages_frameworks.map{ |v| { text: v.name } } + } end end |