diff options
author | gfyoung <gfyoung17@gmail.com> | 2018-08-18 04:19:57 -0700 |
---|---|---|
committer | gfyoung <gfyoung17@gmail.com> | 2018-09-06 17:33:46 -0700 |
commit | 1993a4449a5be44acfa5a9e1a94842e05da5edd5 (patch) | |
tree | 80a38bd0b427a5baf7ca36a3a71f8eb75c9d912f /app/helpers/broadcast_messages_helper.rb | |
parent | 07d5ee361a438fcfff28fe184bbec2aa98ce5d14 (diff) | |
download | gitlab-ce-1993a4449a5be44acfa5a9e1a94842e05da5edd5.tar.gz |
Enable frozen string for app/helpers/**/*.rb
Partially addresses #47424.
Diffstat (limited to 'app/helpers/broadcast_messages_helper.rb')
-rw-r--r-- | app/helpers/broadcast_messages_helper.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/helpers/broadcast_messages_helper.rb b/app/helpers/broadcast_messages_helper.rb index 0a15c29cfb5..289cb44f1e8 100644 --- a/app/helpers/broadcast_messages_helper.rb +++ b/app/helpers/broadcast_messages_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module BroadcastMessagesHelper def broadcast_message(message) return unless message.present? @@ -8,18 +10,17 @@ module BroadcastMessagesHelper end def broadcast_message_style(broadcast_message) - style = '' + style = [] if broadcast_message.color.present? style << "background-color: #{broadcast_message.color}" - style << '; ' if broadcast_message.font.present? end if broadcast_message.font.present? style << "color: #{broadcast_message.font}" end - style + style.join('; ') end def broadcast_message_status(broadcast_message) |