Lint Slim files and fix offenses

The fixing was partially done manually and partially automatically.
This commit is contained in:
Sebastian Serth
2024-04-13 20:06:03 +02:00
committed by Dominic Sauer
parent ddfa06ffaa
commit 9a9efd5caa
91 changed files with 378 additions and 392 deletions

View File

@@ -14,4 +14,4 @@
label.form-check-label
= f.check_box(:important, class: 'form-check-input')
= t('activerecord.attributes.error_template_attribute.important')
.actions = render('shared/submit_button', f: f, object: @error_template_attribute)
.actions = render('shared/submit_button', f:, object: @error_template_attribute)

View File

@@ -1,7 +1,7 @@
h1 = ErrorTemplateAttribute.model_name.human(count: 2)
.table-responsive
table.table class="#{@error_template_attributes.present? ? 'sortable' : ''}"
table.table class=(@error_template_attributes.present? ? 'sortable' : '')
thead
tr
th
@@ -14,9 +14,9 @@ h1 = ErrorTemplateAttribute.model_name.human(count: 2)
tr
td
- if error_template_attribute.important
span class="fa-solid fa-star" aria-hidden="true"
span.fa-solid.fa-star aria-hidden='true'
- else
span class="fa-regular fa-star" aria-hidden="true"
span.fa-regular.fa-star aria-hidden='true'
td = link_to_if(policy(error_template_attribute).show?, error_template_attribute.key, error_template_attribute)
td = error_template_attribute.description
td

View File

@@ -2,10 +2,10 @@ h1
= @error_template_attribute
= render('shared/edit_button', object: @error_template_attribute)
- [:key, :description].each do |attribute|
- %i[key description].each do |attribute|
= row(label: "error_template_attribute.#{attribute}", value: @error_template_attribute.send(attribute))
= row(label: "error_template_attribute.key") do
= row(label: 'error_template_attribute.key') do
code = @error_template_attribute.key
= row(label: "error_template_attribute.important", value: @error_template_attribute.important)
= row(label: 'error_template_attribute.important', value: @error_template_attribute.important)
// todo: used by