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
This commit is contained in:
commit
80eebd8e33
|
@ -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
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
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
|
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})"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue