Fix broken _account_logo partial after erblint autocorrect

erblint's autocorrect on the prior commit stripped the opening
<% tag from the variable-assignment block in
app/views/shared/_account_logo.html.erb, leaving plain Ruby code as
literal HTML and a NameError on every render. The "Failure/Error:
<% if acc&.logo&.attached? %>" cascade in CI was 40+ specs hitting
this partial via the navbar / start_form / submit_form / share-link
QR / submission show paths. Restoring the proper <% ... %> tag.

Also drop the now-redundant `# rubocop:disable Rails/Exit` comments
in spec/rails_helper.rb (CI's rubocop-rails doesn't flag those
lines) and add the same path to .rubocop.yml's Rails/Exit Exclude
so the project's local rubocop agrees.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
pull/687/head
Wabo 1 month ago
parent 8dbf5b6cab
commit a02e49c044

@ -24,6 +24,10 @@ Metrics/BlockLength:
Style/Documentation:
Enabled: false
Rails/Exit:
Exclude:
- spec/rails_helper.rb
Lint/MissingSuper:
Enabled: false

@ -4,11 +4,10 @@
class: CSS class string forwarded to <img>/<svg>
width: pixel width (default 37)
height: pixel height (default 37) %>
acc = local_assigns[:account]
<% acc = local_assigns[:account]
klass = local_assigns[:class]
w = local_assigns.fetch(:width, '37')
h = local_assigns.fetch(:height, '37')
%>
h = local_assigns.fetch(:height, '37') %>
<% if acc&.logo&.attached? %>
<%= image_tag rails_blob_path(acc.logo, disposition: 'inline'),
class: klass,

@ -4,7 +4,7 @@ require 'spec_helper'
ENV['RAILS_ENV'] ||= 'test'
ENV['TZ'] ||= 'UTC'
require_relative '../config/environment'
abort('The Rails environment is running in production mode!') if Rails.env.production? # rubocop:disable Rails/Exit
abort('The Rails environment is running in production mode!') if Rails.env.production?
require 'rspec/rails'
require 'capybara/cuprite'
require 'capybara/rspec'
@ -42,7 +42,7 @@ Rails.root.glob('spec/support/**/*.rb').each { |f| require f }
begin
ActiveRecord::Migration.maintain_test_schema!
rescue ActiveRecord::PendingMigrationError => e
abort e.to_s.strip # rubocop:disable Rails/Exit
abort e.to_s.strip
end
RSpec.configure do |config|

Loading…
Cancel
Save