<p></p>
<p><b>@tomhughes</b> commented on this pull request.</p>
<p>I think I did look at this one before but I was concerned that where some of the things being joined were non-trivial expressions it might all become a bit unreadable.</p>
<p>As is often the case the style guide is unfortunately lacking in any rationale as to why you should prefer interpolation - my natural assumption would be that concatenation would generally be higher performance for example not that it matters most of the time.</p>
<p>I notice that <code>format</code> is an acceptable approach though, which would be easier to read where some of the things being interpolated are more complicated expressions.</p><hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2921#discussion_r513619504">app/helpers/title_helper.rb</a>:</p>
<pre style='color:#555'>> @@ -6,7 +6,7 @@ def self.coder
def set_title(title = nil)
if title
@title = TitleHelper.coder.decode(title.gsub("<bdi>", "\u202a").gsub("</bdi>", "\u202c"))
- response.headers["X-Page-Title"] = ERB::Util.u(@title + " | " + t("layouts.project_name.title"))
+ response.headers["X-Page-Title"] = ERB::Util.u("#{@title} | #{t('layouts.project_name.title')}")
</pre>
<p>This is getting quite messy - might <code>format</code> be a better choice here?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2921#pullrequestreview-518900126">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLIB6QICVEJK5PV74TDSNBGRHANCNFSM4TCRTX2Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLMT5JFNZRG2NE74AYTSNBGRHA5CNFSM4TCRTX22YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOD3W4THQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2921#pullrequestreview-518900126",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2921#pullrequestreview-518900126",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>