Apply Layout/RedundantLineBreak rule to short lines

We're not adding the rule because it would apply the current line length
rule of 110 characters per line. We still haven't decided whether we'll
keep that rule or make lines shorter so they're easier to read,
particularly when vertically splitting the editor window.

So, for now, I'm applying the rule to lines which are about 90
characters long.
This commit is contained in:
Javi Martín
2021-08-11 19:17:31 +02:00
parent ac5c9459c7
commit 65c9786db7
44 changed files with 103 additions and 310 deletions

View File

@@ -41,8 +41,7 @@ class Admin::SiteCustomization::InformationTextsController < Admin::SiteCustomiz
end
def delete_translations
languages_to_delete = params[:enabled_translations].select { |_, v| v == "0" }
.keys
languages_to_delete = params[:enabled_translations].select { |_, v| v == "0" }.keys
languages_to_delete.each do |locale|
I18nContentTranslation.where(locale: locale).destroy_all
@@ -56,8 +55,6 @@ class Admin::SiteCustomization::InformationTextsController < Admin::SiteCustomiz
end
def enabled_translations
params.fetch(:enabled_translations, {})
.select { |_, v| v == "1" }
.keys
params.fetch(:enabled_translations, {}).select { |_, v| v == "1" }.keys
end
end