demarches-normaliennes/app/helpers/champ_helper.rb

13 lines
373 B
Ruby
Raw Normal View History

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
2018-10-17 12:07:25 +02:00
def geo_data(champ)
# rubocop:disable Rails/OutputSafety
2018-11-30 13:19:19 +01:00
raw(champ.to_render_data.to_json)
2018-10-17 12:07:25 +02:00
# rubocop:enable Rails/OutputSafety
end
end