diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2016-12-21 17:59:41 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2016-12-21 17:59:41 +0300 |
commit | a516478d7b953e15cef1bc84280ea9913c206d33 (patch) | |
tree | 0d3342b685b3e8a4c73046fdb2816c49b130feb7 /app/helpers | |
parent | 70da604de5e5e00ae97325fe837a0d533cd85b8b (diff) | |
parent | 1d6c8ce50fbf8eeeed3c38d24b654673e65fef7b (diff) |
Merge branch 'zj-mattermost-slash-config' into 'master'
Mattermost slash auto config
Closes #24769
See merge request !8070
Diffstat (limited to 'app/helpers')
-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 |