Add and apply MultilineMethodCallIndentation rule

This commit is contained in:
Javi Martín
2023-07-01 18:08:54 +02:00
parent 629e208e9d
commit 5b6de96241
35 changed files with 131 additions and 110 deletions

View File

@@ -110,10 +110,10 @@ module Globalizable
end.join(", ")
translations_ids = translation_class
.select("DISTINCT ON (#{translations_foreign_key}) id")
.where(locale: fallbacks)
.joins("LEFT JOIN (VALUES #{fallbacks_with_order}) AS locales(name, ordering) ON locale = locales.name")
.order(translations_foreign_key, "locales.ordering")
.select("DISTINCT ON (#{translations_foreign_key}) id")
.where(locale: fallbacks)
.joins("LEFT JOIN (VALUES #{fallbacks_with_order}) AS locales(name, ordering) ON locale = locales.name")
.order(translations_foreign_key, "locales.ordering")
with_translations(fallbacks).where("#{translations_table_name}.id": translations_ids)
end