demarches-normaliennes/app/models/champs/yes_no_champ.rb
2019-01-29 15:23:09 +01:00

25 lines
286 B
Ruby

class Champs::YesNoChamp < Champ
def search_terms
if true?
[libelle]
end
end
def to_s
processed_value
end
def for_export
processed_value
end
def true?
value == 'true'
end
private
def processed_value
true? ? 'Oui' : 'Non'
end
end