Use enum to the fullest with TypeDeChamp.type_champs
This commit is contained in:
parent
16a719922b
commit
2d3b553e4d
21 changed files with 94 additions and 94 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue