[openstreetmap/openstreetmap-website] Refactor turbo-frame element to avoid multiline conditionals inside html attribute (PR #6627)

Andy Allan notifications at github.com
Wed Dec 17 17:32:03 UTC 2025


While the original is perfectly valid erb, it's hard to read and hard for erblint to parse.

This refactor moves the multi-line conditional logic outside of the turbo-frame `src` html attribute.

This is needed before we can introduce the erblint [HardCodedString](https://github.com/Shopify/erb_lint/?tab=readme-ov-file#hardcodedstring) linter

### How has this been tested?

I checked with a local dev instance to make sure that the turbo frame worked with a relation with > 10 members

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/6627

-- Commit Summary --

  * Refactor turbo-frame element to avoid multiline conditionals inside html attribute

-- File Changes --

    M app/views/browse/_relation.html.erb (16)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/6627.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6627.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6627
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6627 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251217/f31c6d0f/attachment.htm>


More information about the rails-dev mailing list