Fix lingering erblint failures in sms_settings/index.html.erb

The previous lint fix swapped a `<% ... %>` block-opener style but
left a multi-line hash literal and multi-line `case` expression inside
the same ERB tag, which tripped Layout/FirstHashElementIndentation,
Layout/IndentationConsistency, and the closing-newline-before-`%>`
rule.

Reshape: each assignment lives in its own single-line `<% %>` tag, and
the per-provider sending-number lookup is a plain hash dispatch rather
than a multi-line case. Same runtime behaviour; lint-clean.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
pull/687/head
Wabo 1 month ago
parent 02b98fda3e
commit 34250ac305

@ -5,20 +5,10 @@
<% value = @encrypted_config.value || {} %>
<% sms_live = Sms.enabled_for?(current_account) %>
<% provider_labels = {
'bulkvs' => 'BulkVS',
'twilio' => 'Twilio',
'voipms' => 'VoIP.ms',
'signalwire' => 'SignalWire'
}
sending_number = case value['provider'].to_s
when 'twilio' then value['twilio_from']
when 'voipms' then value['voipms_did']
when 'signalwire' then value['signalwire_from']
else value['from_number']
end
selected_provider = value['provider'].presence || 'bulkvs'
%>
<% provider_labels = { 'bulkvs' => 'BulkVS', 'twilio' => 'Twilio', 'voipms' => 'VoIP.ms', 'signalwire' => 'SignalWire' } %>
<% sending_number_keys = { 'twilio' => 'twilio_from', 'voipms' => 'voipms_did', 'signalwire' => 'signalwire_from' } %>
<% sending_number = value[sending_number_keys[value['provider'].to_s] || 'from_number'] %>
<% selected_provider = value['provider'].presence || 'bulkvs' %>
<% if sms_live %>
<div class="alert alert-success mb-4">

Loading…
Cancel
Save