From 0a54db6db5ea57641eff4946adb34bff947885ed Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Mon, 7 Oct 2024 15:09:21 +0200 Subject: [PATCH] remove human_to_filter --- app/models/types_de_champ/type_de_champ_base.rb | 4 ---- app/models/types_de_champ/yes_no_type_de_champ.rb | 11 ----------- 2 files changed, 15 deletions(-) diff --git a/app/models/types_de_champ/type_de_champ_base.rb b/app/models/types_de_champ/type_de_champ_base.rb index 19d37df0e..c01ad1d25 100644 --- a/app/models/types_de_champ/type_de_champ_base.rb +++ b/app/models/types_de_champ/type_de_champ_base.rb @@ -54,10 +54,6 @@ class TypesDeChamp::TypeDeChampBase filter_value end - def human_to_filter(human_value) - human_value - end - class << self def champ_value(champ) champ.value.present? ? champ.value.to_s : champ_default_value diff --git a/app/models/types_de_champ/yes_no_type_de_champ.rb b/app/models/types_de_champ/yes_no_type_de_champ.rb index 4e500a6fd..c34ba1dcf 100644 --- a/app/models/types_de_champ/yes_no_type_de_champ.rb +++ b/app/models/types_de_champ/yes_no_type_de_champ.rb @@ -11,17 +11,6 @@ class TypesDeChamp::YesNoTypeDeChamp < TypesDeChamp::CheckboxTypeDeChamp end end - def human_to_filter(human_value) - downcased = human_value.downcase - if downcased == "oui" - "true" - elsif downcased == "non" - "false" - else - downcased - end - end - class << self def champ_value(champ) champ_formatted_value(champ)