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/[email protected]>
_______________________________________________ rails-dev mailing list [email protected] https://lists.openstreetmap.org/listinfo/rails-dev
