From b584e30902b497476c0acbd912e39ddf66532467 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 13 May 2019 16:23:05 +0800 Subject: [PATCH] Fix modifying frozen strings error take 2. --- app/mailers/user_notifications.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/mailers/user_notifications.rb b/app/mailers/user_notifications.rb index 12e06cd059bb2..bc182849d5ee4 100644 --- a/app/mailers/user_notifications.rb +++ b/app/mailers/user_notifications.rb @@ -360,7 +360,7 @@ def user_locale(user) end def email_post_markdown(post, add_posted_by = false) - result = "#{post.raw}\n\n" + result = +"#{post.raw}\n\n" if add_posted_by result << "#{I18n.t('user_notifications.posted_by', username: post.username, post_date: post.created_at.strftime("%m/%d/%Y"))}\n\n" end @@ -551,7 +551,7 @@ def send_notification_email(opts) context_posts = context_posts.to_a if context_posts.present? - context << "-- \n*#{I18n.t('user_notifications.previous_discussion')}*\n" + context << +"-- \n*#{I18n.t('user_notifications.previous_discussion')}*\n" context_posts.each do |cp| context << email_post_markdown(cp, true) end