Commit d78272a1 authored by Rémy Coutable's avatar Rémy Coutable

Fix a frozen string error in app/mailers/notify.rb

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 5a727a4d
...@@ -166,7 +166,7 @@ class Notify < BaseMailer ...@@ -166,7 +166,7 @@ class Notify < BaseMailer
headers['In-Reply-To'] = message_id(model) headers['In-Reply-To'] = message_id(model)
headers['References'] = [message_id(model)] headers['References'] = [message_id(model)]
headers[:subject]&.prepend('Re: ') headers[:subject] = "Re: #{headers[:subject]}" if headers[:subject]
mail_thread(model, headers) mail_thread(model, headers)
end end
......
---
title: Fix a frozen string error in app/mailers/notify.rb
merge_request: 23683
author:
type: fixed
...@@ -28,8 +28,8 @@ describe Notify do ...@@ -28,8 +28,8 @@ describe Notify do
end end
def have_referable_subject(referable, reply: false) def have_referable_subject(referable, reply: false)
prefix = referable.project ? "#{referable.project.name} | " : '' prefix = (referable.project ? "#{referable.project.name} | " : '').freeze
prefix.prepend('Re: ') if reply prefix = "Re: #{prefix}" if reply
suffix = "#{referable.title} (#{referable.to_reference})" suffix = "#{referable.title} (#{referable.to_reference})"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment