From 5a7b740f5873c280b198051550abbb1318698433 Mon Sep 17 00:00:00 2001 From: Damien Le Thiec Date: Tue, 31 Jan 2023 17:06:00 +0100 Subject: [PATCH] Clean rubocop alerts --- app/models/type_de_champ.rb | 2 +- app/models/types_de_champ/prefill_repetition_type_de_champ.rb | 2 +- app/models/types_de_champ/prefill_type_de_champ.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/type_de_champ.rb b/app/models/type_de_champ.rb index 60308633c..46293894e 100644 --- a/app/models/type_de_champ.rb +++ b/app/models/type_de_champ.rb @@ -272,7 +272,7 @@ class TypeDeChamp < ApplicationRecord TypeDeChamp.type_champs.fetch(:checkbox), TypeDeChamp.type_champs.fetch(:drop_down_list), TypeDeChamp.type_champs.fetch(:regions), - TypeDeChamp.type_champs.fetch(:repetition), + TypeDeChamp.type_champs.fetch(:repetition) ]) end diff --git a/app/models/types_de_champ/prefill_repetition_type_de_champ.rb b/app/models/types_de_champ/prefill_repetition_type_de_champ.rb index b46809f3e..e72ce1709 100644 --- a/app/models/types_de_champ/prefill_repetition_type_de_champ.rb +++ b/app/models/types_de_champ/prefill_repetition_type_de_champ.rb @@ -14,7 +14,7 @@ class TypesDeChamp::PrefillRepetitionTypeDeChamp < TypesDeChamp::PrefillTypeDeCh end def possible_values_sentence - "#{I18n.t("views.prefill_descriptions.edit.possible_values.#{type_champ}_html")}
#{possible_values.join("
")}".html_safe + "#{I18n.t("views.prefill_descriptions.edit.possible_values.#{type_champ}_html")}
#{possible_values.join("
")}".html_safe # rubocop:disable Rails/OutputSafety end def example_value diff --git a/app/models/types_de_champ/prefill_type_de_champ.rb b/app/models/types_de_champ/prefill_type_de_champ.rb index 6e481cd88..99017da47 100644 --- a/app/models/types_de_champ/prefill_type_de_champ.rb +++ b/app/models/types_de_champ/prefill_type_de_champ.rb @@ -38,7 +38,7 @@ class TypesDeChamp::PrefillTypeDeChamp < SimpleDelegator def possible_values_sentence if too_many_possible_values? - I18n.t("views.prefill_descriptions.edit.possible_values.#{type_champ}_html").html_safe + I18n.t("views.prefill_descriptions.edit.possible_values.#{type_champ}_html").html_safe # rubocop:disable Rails/OutputSafety else possible_values.to_sentence end