demarches-normaliennes/app/helpers/champ_helper.rb
2018-11-30 13:28:30 +01:00

12 lines
373 B
Ruby

module ChampHelper
def has_label?(champ)
types_without_label = [TypeDeChamp.type_champs.fetch(:header_section), TypeDeChamp.type_champs.fetch(:explication)]
!types_without_label.include?(champ.type_champ)
end
def geo_data(champ)
# rubocop:disable Rails/OutputSafety
raw(champ.to_render_data.to_json)
# rubocop:enable Rails/OutputSafety
end
end