<span style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">
  <p dir="auto">Okay, seems like I was looking in the wrong places. Those rich text linkify calls do call the function in the parent class.</p>
<p dir="auto">The linkify defined in ApplicationHelper is called from other places. In that case, is it really a good idea to define effectively the same method but with subtle differences in separate places, and give it exactly the same name? Perhaps one can be made an alias of the other?</p>
<p dir="auto">The helpful folks over at the Ruby Discord server helped me figure this out:</p>
<blockquote>
<p dir="auto">my guess: you're getting confused as to who is calling what. The <code class="notranslate">linkify</code> calls in <code class="notranslate">rich_text.rb</code> are calling each other whereas the <code class="notranslate">linkify</code> calls in app are not calling the linkify methods in <code class="notranslate">rich_text.rb</code>...  I mostly see this as very bad naming and that should be addressed.</p>
<p dir="auto">Here's all the views and the calls to the helpers' <code class="notranslate">linkify</code>:</p>
<pre class="notranslate"><code class="notranslate">app/helpers/application_helper.rb
4:  def linkify(text)

app/helpers/browse_tags_helper.rb
43:      safe_join(value.split(";", -1).map { |x| linkify(h(x)) }, ";")

app/views/changesets/show.html.erb
7:    <%= linkify(@changeset.tags["comment"].to_s.presence || t("browse.no_comment")) %>

app/views/changesets/index.atom.builder
66:                      tag_tr.td "#{tag[0]} = #{linkify(tag[1])}"

app/views/browse/_common_details.html.erb
12:    <%= linkify(common_details.changeset.tags["comment"]) %>
</code></pre>
</blockquote><p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/5883#issuecomment-2778332416">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLL5OI3FFRMUYLK4TGD2XZQQ7AVCNFSM6AAAAAB2M5CKACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONZYGMZTENBRGY">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLMUFQNHGNR2W5PJAS32XZQQ7A5CNFSM6AAAAAB2M5CKACWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTVFTH6QA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/5883/2778332416</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
</span>


<div style="display: flex; flex-wrap: wrap; white-space: pre-wrap; align-items: center; "><img alt="NeatNit" height="20" width="20" style="border-radius:50%; margin-right: 4px;" decoding="async" src="https://avatars.githubusercontent.com/u/2400026?s=20&v=4" /><strong>NeatNit</strong> left a comment <a href="https://github.com/openstreetmap/openstreetmap-website/issues/5883#issuecomment-2778332416">(openstreetmap/openstreetmap-website#5883)</a></div>
<p dir="auto">Okay, seems like I was looking in the wrong places. Those rich text linkify calls do call the function in the parent class.</p>
<p dir="auto">The linkify defined in ApplicationHelper is called from other places. In that case, is it really a good idea to define effectively the same method but with subtle differences in separate places, and give it exactly the same name? Perhaps one can be made an alias of the other?</p>
<p dir="auto">The helpful folks over at the Ruby Discord server helped me figure this out:</p>
<blockquote>
<p dir="auto">my guess: you're getting confused as to who is calling what. The <code class="notranslate">linkify</code> calls in <code class="notranslate">rich_text.rb</code> are calling each other whereas the <code class="notranslate">linkify</code> calls in app are not calling the linkify methods in <code class="notranslate">rich_text.rb</code>...  I mostly see this as very bad naming and that should be addressed.</p>
<p dir="auto">Here's all the views and the calls to the helpers' <code class="notranslate">linkify</code>:</p>
<pre class="notranslate"><code class="notranslate">app/helpers/application_helper.rb
4:  def linkify(text)

app/helpers/browse_tags_helper.rb
43:      safe_join(value.split(";", -1).map { |x| linkify(h(x)) }, ";")

app/views/changesets/show.html.erb
7:    <%= linkify(@changeset.tags["comment"].to_s.presence || t("browse.no_comment")) %>

app/views/changesets/index.atom.builder
66:                      tag_tr.td "#{tag[0]} = #{linkify(tag[1])}"

app/views/browse/_common_details.html.erb
12:    <%= linkify(common_details.changeset.tags["comment"]) %>
</code></pre>
</blockquote>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/5883#issuecomment-2778332416">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLL5OI3FFRMUYLK4TGD2XZQQ7AVCNFSM6AAAAAB2M5CKACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONZYGMZTENBRGY">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLMUFQNHGNR2W5PJAS32XZQQ7A5CNFSM6AAAAAB2M5CKACWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTVFTH6QA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/5883/2778332416</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>

<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/5883#issuecomment-2778332416",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/5883#issuecomment-2778332416",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>