<p></p>
<p><b>@tomhughes</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6316#discussion_r2274073254">app/controllers/changesets_controller.rb</a>:</p>
<pre style='color:#555'>> +    @ways = @changeset.old_ways
+                      .order(:way_id, :version)
+                      .offset(ELEMENTS_PER_PAGE * (@current_way_page - 1))
+                      .limit(ELEMENTS_PER_PAGE)
+  end
+
+  def load_relations
+    @relations_count = @changeset.actual_num_changed_relations
+    @current_relation_page = params[:relation_page].to_i.clamp(1, element_pages_count(@relations_count))
+    @relations = @changeset.old_relations
+                           .order(:relation_id, :version)
+                           .offset(ELEMENTS_PER_PAGE * (@current_relation_page - 1))
+                           .limit(ELEMENTS_PER_PAGE)
+  end
+
+  helper_method def element_pages_count(elements_count)
</pre>
<p dir="auto">Oh that's interesting about <code class="notranslate">def</code> and something I didn't know! I guess there's no reason not to do it this way.</p>

<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/pull/6316#discussion_r2274073254">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJSOCIZY76XAM47BBD3NNVBPAVCNFSM6AAAAACDU7I76WVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTCMJWHEYDQOBSG4">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<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/pull/6316/review/3116908827</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/pull/6316#discussion_r2274073254",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6316#discussion_r2274073254",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>