diff options
author | Nick Thomas <nick@gitlab.com> | 2016-10-07 01:01:42 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2016-10-07 04:54:26 +0300 |
commit | 9920551536bb4f78dffeaaf3a194b92f54c34a47 (patch) | |
tree | dad5b2d5f1b725e66d29d355c5095b6899546427 /app/helpers/broadcast_messages_helper.rb | |
parent | dd159a750b294ee89cb8a4143284ff9788b639fc (diff) |
Enable CacheMarkdownField for the remaining models
This commit alters views for the following models to use the markdown cache if
present:
* AbuseReport
* Appearance
* ApplicationSetting
* BroadcastMessage
* Group
* Issue
* Label
* MergeRequest
* Milestone
* Project
At the same time, calls to `escape_once` have been moved into the `single_line`
Banzai pipeline, so they can't be missed out by accident and the work is done
at save, rather than render, time.
Diffstat (limited to 'app/helpers/broadcast_messages_helper.rb')
-rw-r--r-- | app/helpers/broadcast_messages_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/broadcast_messages_helper.rb b/app/helpers/broadcast_messages_helper.rb index 43a29c96bca..eb03ced67eb 100644 --- a/app/helpers/broadcast_messages_helper.rb +++ b/app/helpers/broadcast_messages_helper.rb @@ -3,7 +3,7 @@ module BroadcastMessagesHelper return unless message.present? content_tag :div, class: 'broadcast-message', style: broadcast_message_style(message) do - icon('bullhorn') << ' ' << render_broadcast_message(message.message) + icon('bullhorn') << ' ' << render_broadcast_message(message) end end @@ -32,7 +32,7 @@ module BroadcastMessagesHelper end end - def render_broadcast_message(message) - Banzai.render(message, pipeline: :broadcast_message).html_safe + def render_broadcast_message(broadcast_message) + Banzai.render_field(broadcast_message, :message).html_safe end end |