[openstreetmap/openstreetmap-website] Enable erb-no-instance-variables-in-partials lint rule (PR #6921)
Tom Hughes
notifications at github.com
Fri Mar 20 19:22:06 UTC 2026
This enables the `erb-no-instance-variables-in-partials` lint rule and fixes the resulting warnings.
In order to make passing pagination details down through partials it also adjust the pagination code to group the details in a struct instead of passing multiple variables.
It also folds a few partials that are only used once into their parent template as there's no point using a partial in that case and it just creates extra overhead and requires work to convert member variables to locals when calling the partial.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/6921
-- Commit Summary --
* Group pagination data into a struct
* Merge some single use partials into their parent templates
* Remove instance variables from partials
-- File Changes --
M .herb.yml (2)
M app/controllers/changesets_controller.rb (2)
M app/controllers/concerns/pagination_methods.rb (12)
M app/controllers/diary_entries_controller.rb (2)
M app/controllers/issues_controller.rb (4)
M app/controllers/old_nodes_controller.rb (2)
M app/controllers/old_relations_controller.rb (2)
M app/controllers/old_ways_controller.rb (2)
M app/controllers/traces_controller.rb (2)
M app/controllers/user_blocks_controller.rb (2)
M app/controllers/users/changeset_comments_controller.rb (2)
M app/controllers/users/diary_comments_controller.rb (2)
M app/controllers/users/issued_blocks_controller.rb (2)
M app/controllers/users/lists_controller.rb (2)
M app/controllers/users/received_blocks_controller.rb (2)
M app/helpers/user_mailer_helper.rb (4)
D app/views/accounts/terms/_terms.html.erb (46)
M app/views/accounts/terms/show.html.erb (45)
M app/views/application/_auth_providers.html.erb (8)
M app/views/browse/_common_details.html.erb (6)
M app/views/browse/_node.html.erb (2)
M app/views/browse/_relation.html.erb (2)
M app/views/browse/_way.html.erb (2)
M app/views/changesets/index.atom.builder (4)
M app/views/changesets/index.html.erb (12)
M app/views/diary_entries/_diary_entry.html.erb (4)
M app/views/diary_entries/_diary_entry_heading.html.erb (4)
M app/views/diary_entries/_form.html.erb (6)
M app/views/diary_entries/_navigation.html.erb (8)
M app/views/diary_entries/_page.html.erb (12)
M app/views/diary_entries/_profile_diaries.html.erb (6)
M app/views/diary_entries/edit.html.erb (2)
M app/views/diary_entries/index.html.erb (6)
M app/views/diary_entries/new.html.erb (2)
M app/views/diary_entries/show.html.erb (4)
D app/views/issues/_comments.html.erb (31)
M app/views/issues/_page.html.erb (21)
M app/views/issues/index.html.erb (7)
M app/views/issues/reporters/_reporters.html.erb (8)
M app/views/issues/reporters/index.html.erb (4)
M app/views/issues/show.html.erb (31)
M app/views/languages_panes/_select_language_list.html.erb (6)
M app/views/languages_panes/show.html.erb (4)
M app/views/layouts/_head.html.erb (6)
M app/views/layouts/_meta.html.erb (4)
M app/views/layouts/error.html.erb (2)
M app/views/layouts/site.html.erb (2)
M app/views/layouts/turbo_frame.html.erb (2)
M app/views/notes/_notes_paging_nav.html.erb (12)
M app/views/notes/index.html.erb (4)
M app/views/old_elements/_actions.html.erb (12)
M app/views/old_elements/index.html.erb (10)
M app/views/old_elements/index.turbo_stream.erb (12)
M app/views/old_nodes/show.html.erb (2)
M app/views/old_relations/show.html.erb (2)
M app/views/old_ways/show.html.erb (2)
M app/views/sessions/new.html.erb (2)
M app/views/shared/_pagination.html.erb (12)
M app/views/site/_id.html.erb (8)
M app/views/site/_potlatch.html.erb (2)
M app/views/site/_potlatch2.html.erb (4)
M app/views/site/edit.html.erb (2)
M app/views/traces/_page.html.erb (12)
M app/views/traces/index.html.erb (4)
M app/views/user_blocks/_block.html.erb (6)
M app/views/user_blocks/_navigation.html.erb (18)
M app/views/user_blocks/_page.html.erb (16)
M app/views/user_blocks/edit.html.erb (2)
M app/views/user_blocks/index.html.erb (6)
M app/views/user_blocks/new.html.erb (2)
M app/views/user_blocks/show.html.erb (2)
M app/views/user_mailer/_gpx_details.html.erb (22)
M app/views/user_mailer/_message_body.html.erb (10)
M app/views/user_mailer/changeset_comment_notification.html.erb (2)
M app/views/user_mailer/diary_comment_notification.html.erb (2)
M app/views/user_mailer/follow_notification.html.erb (2)
M app/views/user_mailer/gpx_failure.html.erb (5)
M app/views/user_mailer/gpx_failure.text.erb (5)
M app/views/user_mailer/gpx_success.html.erb (8)
M app/views/user_mailer/gpx_success.text.erb (8)
M app/views/user_mailer/message_notification.html.erb (2)
M app/views/user_mailer/note_comment_notification.html.erb (2)
D app/views/users/_role_icons.html.erb (22)
M app/views/users/_sidebar_section.html.erb (4)
M app/views/users/changeset_comments/_page.html.erb (12)
M app/views/users/comments/index.html.erb (4)
M app/views/users/diary_comments/_page.html.erb (12)
M app/views/users/issued_blocks/show.html.erb (6)
M app/views/users/lists/_page.html.erb (16)
M app/views/users/lists/show.html.erb (2)
M app/views/users/new.html.erb (2)
M app/views/users/received_blocks/show.html.erb (6)
M app/views/users/show.html.erb (35)
M config/locales/en.yml (36)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/6921.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6921.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6921
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6921 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260320/d118d07e/attachment-0001.htm>
More information about the rails-dev
mailing list