diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-20 23:17:32 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-20 23:17:32 +0100 |
commit | 22a0567823e792bd760ced79539a0b2c4bfd8f5e (patch) | |
tree | 8de6dfef6ea19ca18dcdbdd736ec48f21b02a198 /app/helpers/mattermost_helper.rb | |
parent | 70dcd45de207992b77b23175d7ed9e4643342f72 (diff) | |
download | gitlab-ce-22a0567823e792bd760ced79539a0b2c4bfd8f5e.tar.gz |
Fix a few error messages
Diffstat (limited to 'app/helpers/mattermost_helper.rb')
-rw-r--r-- | app/helpers/mattermost_helper.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/mattermost_helper.rb b/app/helpers/mattermost_helper.rb new file mode 100644 index 00000000000..49ac12db832 --- /dev/null +++ b/app/helpers/mattermost_helper.rb @@ -0,0 +1,9 @@ +module MattermostHelper + def mattermost_teams_options(teams) + teams_options = teams.map do |id, options| + [options['display_name'] || options['name'], id] + end + + teams_options.compact.unshift(['Select team...', '0']) + end +end |