Use enum to the fullest with TypeDeChamp.type_champs

This commit is contained in:
gregoirenovel 2018-08-28 16:22:34 +02:00
parent 16a719922b
commit 2d3b553e4d
21 changed files with 94 additions and 94 deletions

View file

@ -1,6 +1,6 @@
module ChampHelper
def has_label?(champ)
types_without_label = ['header_section', 'explication']
types_without_label = [TypeDeChamp.type_champs.fetch(:header_section), TypeDeChamp.type_champs.fetch(:explication)]
!types_without_label.include?(champ.type_champ)
end
end