From 76804b0bc06286ded159163a2d1d5d598fba2213 Mon Sep 17 00:00:00 2001 From: maebeale Date: Tue, 14 Jul 2026 19:10:45 -0400 Subject: [PATCH 1/9] Add ERB Lint to fill the gap RuboCop leaves on templates RuboCop only parses .rb, so nothing checked the Ruby inside <% %> tags or the ERB/HTML conventions documented in CLAUDE.md. Add erb_lint with a conservative, fully-autocorrectable ruleset (mechanical HTML/ERB formatting plus an omakase-matching RuboCop subset), wire it into ai/lint, and run it in CI alongside RuboCop. Co-Authored-By: Claude Opus 4.8 (1M context) --- .erb_lint.yml | 42 +++++++++++++++++++++++++++++++++++ .github/workflows/rubocop.yml | 2 ++ Gemfile | 1 + Gemfile.lock | 19 ++++++++++++++++ ai/lint | 15 +++++++++---- 5 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 .erb_lint.yml diff --git a/.erb_lint.yml b/.erb_lint.yml new file mode 100644 index 0000000000..70bbd110b1 --- /dev/null +++ b/.erb_lint.yml @@ -0,0 +1,42 @@ +--- +# ERB Lint β€” fills the gap RuboCop leaves: RuboCop only parses .rb, so nothing +# checked the Ruby inside <% %> tags or our ERB/HTML conventions (CLAUDE.md). +# Scoped conservatively: mechanical HTML/ERB formatting linters plus a small, +# fully autocorrectable RuboCop subset mirroring our omakase style rules. +EnableDefaultLinters: false +linters: + # --- ERB/HTML formatting (all autocorrectable) --- + SpaceAroundErbTag: + enabled: true + ClosingErbTagIndent: + enabled: true + RightTrim: + enabled: true + TrailingWhitespace: + enabled: true + ExtraNewline: + enabled: true + FinalNewline: + enabled: true + SpaceIndentation: + enabled: true + + # --- Ruby inside ERB tags: curated omakase subset, all autocorrectable --- + Rubocop: + enabled: true + rubocop_config: + AllCops: + DisabledByDefault: true + Style/StringLiterals: + Enabled: true + EnforcedStyle: double_quotes + Style/HashSyntax: + Enabled: true + Layout/SpaceInsideHashLiteralBraces: + Enabled: true + Layout/SpaceInsideArrayLiteralBrackets: + Enabled: true + Layout/SpaceInsideReferenceBrackets: + Enabled: true + Layout/SpaceInsideParens: + Enabled: true diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index ed5f02f0ee..33db689db8 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -37,3 +37,5 @@ jobs: rubocop-cache-${{ runner.os }}-${{ env.DEPENDENCIES_HASH }}- - name: Run RuboCop run: bundle exec rubocop --format github --format clang + - name: Run ERB Lint + run: bundle exec erb_lint --lint-all diff --git a/Gemfile b/Gemfile index b94b5a131b..a9483f32d3 100644 --- a/Gemfile +++ b/Gemfile @@ -73,6 +73,7 @@ gem "paper_trail", "~> 17.0" group :development do gem "rubocop-rails-omakase", require: false + gem "erb_lint", require: false end group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index 0761121467..506a76ad94 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -127,6 +127,13 @@ GEM erubi (>= 1.0.0) rack (>= 0.9.0) rouge (>= 1.0.0) + better_html (2.2.0) + actionview (>= 7.0) + activesupport (>= 7.0) + ast (~> 2.0) + erubi (~> 1.4) + parser (>= 2.4) + smart_properties bigdecimal (4.1.2) blazer (3.3.0) activerecord (>= 7.1) @@ -201,6 +208,13 @@ GEM drb (2.2.3) dry-cli (1.4.1) erb (6.0.4) + erb_lint (0.9.0) + activesupport + better_html (>= 2.0.1) + parser (>= 2.7.1.4) + rainbow + rubocop (>= 1) + smart_properties erubi (1.13.1) et-orbi (1.4.0) tzinfo @@ -695,6 +709,7 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.13.2) simplecov_json_formatter (0.1.4) + smart_properties (1.17.0) solid_cache (1.0.10) activejob (>= 7.2) activerecord (>= 7.2) @@ -794,6 +809,7 @@ DEPENDENCIES devise (~> 5.0.4) dotenv-rails draper + erb_lint factory_bot_rails faker feature_flipper @@ -869,6 +885,7 @@ CHECKSUMS base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b bcrypt (3.1.22) sha256=1f0072e88c2d705d94aff7f2c5cb02eb3f1ec4b8368671e19112527489f29032 better_errors (2.10.1) sha256=f798f1bac93f3e775925b7fcb24cffbcf0bb62ee2210f5350f161a6b75fc0a73 + better_html (2.2.0) sha256=e68ab66ab09696b708333bbf35e8aa3c107500ba7892f528e2111624bdd8cf76 bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd binding_of_caller (1.0.1) blazer (3.3.0) sha256=01e151091ce1e7d27c156243916b2f13109ef2ef1a16cfa62bef67f4c5fd169f @@ -904,6 +921,7 @@ CHECKSUMS drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373 dry-cli (1.4.1) sha256=b8015bb76c708aa8705a36faf694973e75eeeffca39b89c8e172dc6f66a7d874 erb (6.0.4) sha256=38e3803694be357fe2bfe312487c74beaf9fb4e5beb3e22498952fe1645b95d9 + erb_lint (0.9.0) sha256=dfb5e40ad839e8d1f0d56ca85ec9a7ac4c9cd966ec281138282f35b323ca7c31 erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9 et-orbi (1.4.0) sha256=6c7e3c90779821f9e3b324c5e96fda9767f72995d6ae435b96678a4f3e2de8bc execjs (2.10.0) sha256=6bcb8be8f0052ff9d370b65d1c080f2406656e150452a0abdb185a133048450d @@ -1094,6 +1112,7 @@ CHECKSUMS simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5 simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246 simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428 + smart_properties (1.17.0) sha256=f9323f8122e932341756ddec8e0ac9ec6e238408a7661508be99439ca6d6384b solid_cache (1.0.10) sha256=bc05a2fb3ac78a6f43cbb5946679cf9db67dd30d22939ededc385cb93e120d41 solid_queue (1.3.1) sha256=d9580111180c339804ff1a810a7768f69f5dc694d31e86cf1535ff2cd7a87428 sprockets (4.2.2) sha256=761e5a49f1c288704763f73139763564c845a8f856d52fba013458f8af1b59b1 diff --git a/ai/lint b/ai/lint index 0e90547725..af4aabf252 100755 --- a/ai/lint +++ b/ai/lint @@ -1,10 +1,17 @@ #!/usr/bin/env bash -# Lint Ruby files with Rubocop. Use --fix to auto-correct. -set -euo pipefail +# Lint Ruby with RuboCop and ERB templates with ERB Lint. Use --fix to +# auto-correct both. File args are passed to RuboCop; ERB Lint always runs +# across all ERB files. +set -uo pipefail source "$(dirname "$0")/.ruby-env" + +status=0 if [[ "${1:-}" == "--fix" ]]; then shift - bundle exec rubocop -a "$@" + bundle exec rubocop -a "$@" || status=$? + bundle exec erb_lint --lint-all --autocorrect || status=$? else - bundle exec rubocop "$@" + bundle exec rubocop "$@" || status=$? + bundle exec erb_lint --lint-all || status=$? fi +exit $status From 0010ba7db9ea48c1d90722f8fa47e1010c17a21e Mon Sep 17 00:00:00 2001 From: maebeale Date: Tue, 14 Jul 2026 19:10:45 -0400 Subject: [PATCH 2/9] Apply ERB Lint autocorrect sweep across templates Mechanical only: normalizes whitespace around/inside ERB tags and applies the omakase Ruby style (double quotes, brace/bracket spacing) to code inside <%= %> tags. No behavioral changes. Co-Authored-By: Claude Opus 4.8 (1M context) --- app/views/active_storage/blobs/_blob.html.erb | 2 +- app/views/addresses/_address_fields.html.erb | 2 - .../admin/ahoy_activities/charts.html.erb | 14 ++--- app/views/admin/analytics/index.html.erb | 54 +++++++------------ .../affiliations/_address_picker.html.erb | 2 +- app/views/affiliations/_fields.html.erb | 4 +- app/views/allocations/new.html.erb | 4 +- .../application/_papertrail_versions.html.erb | 8 +-- .../assets/_display_gallery_media.html.erb | 2 +- app/views/assets/_display_image.html.erb | 3 +- .../assets/_primary_image_picker.html.erb | 4 +- app/views/banners/_form.html.erb | 2 +- app/views/banners/index.html.erb | 4 +- app/views/banners/new.html.erb | 2 +- .../bookmarks/_bookmarks_results.html.erb | 2 +- .../_editable_bookmark_button.html.erb | 2 +- .../_personal_bookmarks_results.html.erb | 4 +- app/views/bookmarks/_personal_row.html.erb | 1 - app/views/bookmarks/tally.html.erb | 3 +- app/views/categories/new.html.erb | 2 +- app/views/comments/_comment_fields.html.erb | 2 +- app/views/comments/_flag_toggle.html.erb | 2 +- .../_community_news_results.html.erb | 4 +- app/views/community_news/_form.html.erb | 6 +-- .../community_news/_search_boxes.html.erb | 2 +- app/views/community_news/edit.html.erb | 1 - app/views/community_news/editor_lazy.html.erb | 2 +- app/views/community_news/new.html.erb | 2 +- app/views/contact_us/index.html.erb | 2 +- .../_details_section.html.erb | 4 +- app/views/dedupes/_preview.html.erb | 19 ++++--- app/views/dedupes/index.html.erb | 2 +- .../devise/confirmations/new_old.html.erb | 2 +- .../confirmation_instructions_old.html.erb | 2 +- .../reset_password_instructions.html.erb | 1 - app/views/devise/sessions/new.html.erb | 2 +- .../bulk_payment_confirmation.html.erb | 2 +- .../event_registration_confirmation.html.erb | 2 +- app/views/event_registrations/_form.html.erb | 14 ++--- .../_payment_history.html.erb | 4 +- .../_readiness_badge.html.erb | 8 +-- .../_search_boxes.html.erb | 2 +- .../event_registrations/_ticket.html.erb | 2 +- app/views/events/_breakdown_card.html.erb | 2 +- app/views/events/_bulk_payment_card.html.erb | 2 +- .../events/_dashboard_money_row.html.erb | 2 +- app/views/events/_form.html.erb | 2 +- .../events/_registrants_results.html.erb | 2 +- app/views/events/_registrants_search.html.erb | 18 +++---- ...egistration_ticket_callout_fields.html.erb | 4 +- .../_reminder_recipient_filters.html.erb | 16 +++--- app/views/events/background.html.erb | 28 +++++----- app/views/events/bulk_payments/new.html.erb | 2 +- .../events/bulk_payments/ticket.html.erb | 2 +- app/views/events/callouts/faq.html.erb | 10 ++-- app/views/events/callouts/resource.html.erb | 16 +++--- app/views/events/dashboard.html.erb | 2 +- app/views/events/index.html.erb | 1 - app/views/events/invoices/_invoice.html.erb | 8 +-- app/views/events/invoices/show.html.erb | 8 +-- app/views/events/new.html.erb | 2 +- app/views/events/onboarding/_results.html.erb | 4 +- app/views/events/onboarding/_row.html.erb | 4 +- .../public_registrations/_form_field.html.erb | 6 +-- .../events/public_registrations/new.html.erb | 1 - app/views/events/receipts/_receipt.html.erb | 6 +-- app/views/events/recipients.html.erb | 2 +- .../events/registrations/invoice.html.erb | 4 +- .../events/registrations/receipt.html.erb | 4 +- app/views/events/revenue.html.erb | 14 ++--- app/views/events/staff.html.erb | 4 +- app/views/faqs/_faq.html.erb | 1 - app/views/faqs/_inline_edit.html.erb | 2 +- app/views/faqs/_search_boxes.html.erb | 2 - app/views/faqs/edit.html.erb | 1 - app/views/forms/_form_field_fields.html.erb | 18 +++---- app/views/grants/_filters.html.erb | 6 +-- app/views/home/_community_news.html.erb | 2 +- app/views/home/_events.html.erb | 2 +- app/views/home/_resources.html.erb | 2 +- app/views/home/_stories.html.erb | 2 +- app/views/home/community_news/index.html.erb | 2 +- app/views/home/resources/index.html.erb | 2 +- app/views/home/stories/index.html.erb | 2 +- app/views/home/workshops/index.html.erb | 2 +- app/views/layouts/_google_webfonts.html.erb | 2 +- app/views/layouts/application.html.erb | 6 +-- app/views/layouts/story_shares.html.erb | 6 +-- .../_combined_workshop_log_summary.html.erb | 10 ++-- app/views/monthly_reports/_form.html.erb | 44 ++++++++------- .../monthly_reports/_media_file.html.erb | 4 +- .../_monthly_reports_results.html.erb | 2 +- app/views/monthly_reports/_quote.html.erb | 7 ++- .../_report_form_field_answers.html.erb | 14 +++-- .../_sectorable_items.html.erb | 4 +- .../_workshop_log_summary.html.erb | 8 +-- .../bulk_payment_confirmation_fyi.html.erb | 2 +- ...ent_registration_confirmation_fyi.html.erb | 1 - .../workshop_log_submitted_fyi.html.erb | 1 - app/views/notifications/_index.html.erb | 2 +- .../notifications/_notification_form.html.erb | 18 +++---- .../notifications/_search_boxes.html.erb | 6 +-- app/views/notifications/show.html.erb | 4 +- app/views/organization_statuses/new.html.erb | 2 +- .../organizations/_address_fields.html.erb | 2 - app/views/organizations/_form.html.erb | 24 ++++----- app/views/organizations/index.html.erb | 2 +- .../organizations_results.html.erb | 2 +- app/views/payments/index.html.erb | 2 +- app/views/payments/payments_results.html.erb | 2 +- app/views/payments/show.html.erb | 4 +- app/views/people/_form.html.erb | 14 ++--- app/views/people/_show_card.html.erb | 4 +- app/views/people/index.html.erb | 2 +- app/views/people/people_results.html.erb | 2 +- app/views/people/show.html.erb | 4 +- app/views/quotes/_form.html.erb | 12 ++--- app/views/quotes/_search_boxes.html.erb | 2 +- app/views/quotes/new.html.erb | 2 +- app/views/reports/_form.html.erb | 36 ++++++------- app/views/reports/_media_file.html.erb | 4 +- app/views/reports/_quote.html.erb | 7 ++- app/views/reports/_quotes.html.erb | 4 +- app/views/reports/_sectorable_items.html.erb | 2 +- app/views/reports/edit.html.erb | 30 +++++------ app/views/reports/edit_story.html.erb | 24 ++++----- app/views/reports/share_story.html.erb | 31 +++++------ .../_categorizable_item_fields.html.erb | 2 +- app/views/resources/_form.html.erb | 4 +- app/views/resources/_resource_card.html.erb | 2 +- app/views/resources/_search_boxes.html.erb | 2 +- app/views/resources/editor_lazy.html.erb | 2 +- app/views/resources/index.html.erb | 2 +- app/views/resources/latest_news.html.erb | 6 +-- app/views/resources/new.html.erb | 2 +- app/views/rich_text_assets/_editor.html.erb | 2 +- app/views/rich_text_assets/_form.html.erb | 2 +- app/views/scholarships/_form.html.erb | 6 +-- app/views/sectors/new.html.erb | 2 +- app/views/shared/_banner.html.erb | 1 - app/views/shared/_footer.html.erb | 2 +- app/views/shared/_footer_nav.html.erb | 7 +-- app/views/shared/_form_field.html.erb | 22 ++++---- app/views/shared/_form_image_field.html.erb | 6 +-- app/views/shared/_form_image_fields.html.erb | 1 - app/views/shared/_loading.html.erb | 2 +- app/views/shared/_navbar.html.erb | 4 +- .../shared/_organization_footer.html.erb | 2 +- .../_report_form_field_answers.html.erb | 16 +++--- app/views/shared/_sector_fields.html.erb | 4 +- app/views/shared/_sortable_fields.html.erb | 2 +- app/views/shared/_user_form_fields.html.erb | 2 +- .../shared/_user_form_form_fields.html.erb | 2 +- app/views/shared/_visibility_filter.html.erb | 2 +- app/views/stories/_form.html.erb | 12 ++--- app/views/stories/_search_boxes.html.erb | 2 +- app/views/stories/_stories_results.html.erb | 6 +-- app/views/stories/editor_lazy.html.erb | 2 +- app/views/stories/new.html.erb | 2 +- app/views/story_ideas/_form.html.erb | 6 +-- app/views/story_ideas/index.html.erb | 1 - app/views/story_shares/_index.html.erb | 4 +- app/views/story_shares/_sector_index.html.erb | 1 - app/views/story_shares/index.html.erb | 2 - app/views/story_shares/show.html.erb | 4 +- .../taggings/_explore_by_combination.html.erb | 2 +- .../taggings/_explore_by_sector.html.erb | 2 +- app/views/taggings/index.html.erb | 5 +- app/views/taggings/matrix.html.erb | 4 +- app/views/users/_form.html.erb | 6 +-- app/views/users/_toggle_lock_button.html.erb | 4 +- app/views/users/edit.html.erb | 4 +- app/views/video_recordings/_form.html.erb | 4 +- .../_video_recording.html.erb | 6 +-- app/views/video_recordings/edit.html.erb | 1 - app/views/video_recordings/new.html.erb | 2 +- app/views/video_recordings/show.html.erb | 1 - app/views/welcome/show.html.erb | 2 +- app/views/windows_types/_form.html.erb | 1 - app/views/windows_types/new.html.erb | 2 +- app/views/workshop_ideas/_form.html.erb | 3 +- .../workshop_ideas/_search_boxes.html.erb | 2 +- app/views/workshop_ideas/index.html.erb | 2 +- app/views/workshop_logs/_form.html.erb | 6 +-- .../workshop_logs/_index_per_page.html.erb | 2 +- .../workshop_logs/_media_file_fields.html.erb | 2 +- .../_report_form_field_answer_fields.html.erb | 2 +- app/views/workshop_logs/index.html.erb | 2 +- .../workshop_variation_ideas/_form.html.erb | 6 +-- app/views/workshop_variations/_form.html.erb | 6 +-- .../_workshop_variations_results.html.erb | 4 +- app/views/workshop_variations/show.html.erb | 4 +- .../_combined_workshop_log_summary.html.erb | 10 ++-- app/views/workshops/_form.html.erb | 4 +- app/views/workshops/_index_row.html.erb | 4 -- .../_show_series_membership_children.html.erb | 2 +- .../_show_series_membership_parents.html.erb | 2 +- app/views/workshops/_show_time_frame.html.erb | 2 +- app/views/workshops/editor_lazy.html.erb | 2 +- app/views/workshops/index.html.erb | 6 +-- app/views/workshops/show.html.erb | 4 +- 201 files changed, 493 insertions(+), 574 deletions(-) diff --git a/app/views/active_storage/blobs/_blob.html.erb b/app/views/active_storage/blobs/_blob.html.erb index 2eebc36fe9..8ddd6bffc4 100644 --- a/app/views/active_storage/blobs/_blob.html.erb +++ b/app/views/active_storage/blobs/_blob.html.erb @@ -1,6 +1,6 @@
attachment--<%= blob.filename.extension %>"> <% if blob.representable? %> - <%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? [ 800, 600 ] : [ 1024, 768 ]) %> + <%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? [800, 600] : [1024, 768]) %> <% end %>
diff --git a/app/views/addresses/_address_fields.html.erb b/app/views/addresses/_address_fields.html.erb index 115e78fbb0..8e7ee86ddb 100644 --- a/app/views/addresses/_address_fields.html.erb +++ b/app/views/addresses/_address_fields.html.erb @@ -36,7 +36,6 @@ -
<%= f.input :locality, @@ -109,7 +108,6 @@ class: "rounded-md border-gray-300 shadow-sm focus:ring-blue-500 focus:border-blue-500" } %> -
diff --git a/app/views/admin/ahoy_activities/charts.html.erb b/app/views/admin/ahoy_activities/charts.html.erb index c252635358..6e51ee1251 100644 --- a/app/views/admin/ahoy_activities/charts.html.erb +++ b/app/views/admin/ahoy_activities/charts.html.erb @@ -30,13 +30,13 @@ <%= select_tag :time_period, options_for_select( [ - ['All time', 'all_time'], - ['Past day', 'past_day'], - ['Past week', 'past_week'], - ['Past month', 'past_month'], - ['Past year', 'past_year'] + ["All time", "all_time"], + ["Past day", "past_day"], + ["Past week", "past_week"], + ["Past month", "past_month"], + ["Past year", "past_year"] ], - params[:time_period] || 'past_month' + params[:time_period] || "past_month" ), class: "px-3 py-2 rounded-md border-gray-300 shadow-sm text-sm text-gray-700", onchange: "this.form.submit()" %> @@ -248,7 +248,7 @@ - + "> <%= val > 0 ? val : "" %> diff --git a/app/views/admin/analytics/index.html.erb b/app/views/admin/analytics/index.html.erb index 28a2bcba82..c9a1f76e38 100644 --- a/app/views/admin/analytics/index.html.erb +++ b/app/views/admin/analytics/index.html.erb @@ -28,12 +28,12 @@ <%= f.label :time_period, "Time period:", class: "text-sm font-medium text-gray-700" %> <%= f.select :time_period, options_for_select([ - ['All time', 'all_time'], - ['Past day', 'past_day'], - ['Past week', 'past_week'], - ['Past month', 'past_month'], - ['Past year', 'past_year'] - ], params[:time_period] || 'past_month'), + ["All time", "all_time"], + ["Past day", "past_day"], + ["Past week", "past_week"], + ["Past month", "past_month"], + ["Past year", "past_year"] + ], params[:time_period] || "past_month"), {}, class: "px-3 py-2 rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 text-sm text-gray-700", onchange: "this.form.submit()" %> @@ -86,16 +86,14 @@ records: @most_viewed_workshops, path_method: :workshop_path, metric: :view_count, - color: :workshops - %> + color: :workshops %> <%= render "admin/analytics/popular_list", title: "Most printed", records: @most_printed_workshops, path_method: :workshop_path, metric: :print_count, - color: :workshops - %> + color: :workshops %>
@@ -135,16 +133,14 @@ records: @most_viewed_community_news, path_method: :community_news_path, metric: :view_count, - color: :community_news - %> + color: :community_news %> <%= render "admin/analytics/popular_list", title: "Most printed", records: @most_printed_community_news, path_method: :community_news_path, metric: :print_count, - color: :community_news - %> + color: :community_news %> @@ -158,16 +154,14 @@ records: @most_viewed_stories, path_method: :story_path, metric: :view_count, - color: :stories - %> + color: :stories %> <%= render "admin/analytics/popular_list", title: "Most printed", records: @most_printed_stories, path_method: :story_path, metric: :print_count, - color: :stories - %> + color: :stories %> @@ -181,48 +175,42 @@ records: @most_viewed_events, path_method: :event_path, metric: :view_count, - color: :events - %> + color: :events %> <%= render "admin/analytics/popular_list", title: "Workshop variations", records: @most_viewed_workshop_variations, path_method: :workshop_variation_path, metric: :view_count, - color: :workshop_variations - %> + color: :workshop_variations %> <%= render "admin/analytics/popular_list", title: "Quotes", records: @most_viewed_quotes, path_method: :quote_path, metric: :view_count, - color: :quotes - %> + color: :quotes %> <%= render "admin/analytics/popular_list", title: "People", records: @most_viewed_people, path_method: :person_path, metric: :view_count, - color: :people - %> + color: :people %> <%= render "admin/analytics/popular_list", title: "Organizations", records: @most_viewed_organizations, path_method: :organization_path, metric: :view_count, - color: :organizations - %> + color: :organizations %> <%= render "admin/analytics/popular_list", title: VideoRecording.model_name.human(count: 2), records: @most_viewed_video_recordings, path_method: :video_recording_path, metric: :view_count, - color: :videos - %> + color: :videos %> @@ -239,15 +227,13 @@ title: "Workshops", records: @zero_engagement_workshops, path_method: :workshop_path, - color: :workshops - %> + color: :workshops %> <%= render "zero_list", title: "Resources", records: @zero_engagement_resources, path_method: :resource_path, - color: :resources - %> + color: :resources %> diff --git a/app/views/affiliations/_address_picker.html.erb b/app/views/affiliations/_address_picker.html.erb index 662976ed8e..0bd424f4f4 100644 --- a/app/views/affiliations/_address_picker.html.erb +++ b/app/views/affiliations/_address_picker.html.erb @@ -6,7 +6,7 @@ When the org has no addresses, renders an equal-width spacer so the following fields stay aligned across rows. %> <% org = f.object.organization %> -<% options = org ? org.addresses.each_with_index.map { |address, i| [ i + 1, address ] } : [] %> +<% options = org ? org.addresses.each_with_index.map { |address, i| [i + 1, address] } : [] %> <% selected_id = f.object.organization_address_id %> <% selected = options.find { |_number, address| address.id == selected_id } %> <% if options.any? %> diff --git a/app/views/affiliations/_fields.html.erb b/app/views/affiliations/_fields.html.erb index 17073012a7..0411c6c695 100644 --- a/app/views/affiliations/_fields.html.erb +++ b/app/views/affiliations/_fields.html.erb @@ -13,9 +13,9 @@
<%# Left accent rendered outside the row so it keeps full color even when an expired row is dimmed by opacity-60. %> " data-inactive-toggle-target="accentBar"> -
" <% if f.object.persisted? %>id="<%= dom_id(f.object) %>"<% end %> data-inactive-toggle-target="row">
diff --git a/app/views/allocations/new.html.erb b/app/views/allocations/new.html.erb index cc393191da..609c65c7bd 100644 --- a/app/views/allocations/new.html.erb +++ b/app/views/allocations/new.html.erb @@ -15,8 +15,8 @@

Error: No payment source found

<% end %> - <%= f.input :allocatable_type, as: :select, collection: ["EventRegistration"], - include_blank: true, + <%= f.input :allocatable_type, as: :select, collection: ["EventRegistration"], + include_blank: true, required: true, input_html: { data: { action: "search-type-select#toggle" } } %>