diff options
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 |