Commit 80eebd8e authored by Douwe Maan's avatar Douwe Maan

Merge branch '55104-frozenerror-can-t-modify-frozen-string' into 'master'

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

Closes #55104

See merge request gitlab-org/gitlab-ce!23683
parents 42d37c1b d78272a1
......@@ -166,7 +166,7 @@ class Notify < BaseMailer
headers['In-Reply-To'] = message_id(model)
headers['References'] = [message_id(model)]
headers[:subject]&.prepend('Re: ')
headers[:subject] = "Re: #{headers[:subject]}" if headers[:subject]
mail_thread(model, headers)
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
end
def have_referable_subject(referable, reply: false)
prefix = referable.project ? "#{referable.project.name} | " : ''
prefix.prepend('Re: ') if reply
prefix = (referable.project ? "#{referable.project.name} | " : '').freeze
prefix = "Re: #{prefix}" if reply
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