demarches-normaliennes/app/models/champs/checkbox_champ.rb
2019-01-03 10:53:50 +01:00

11 lines
162 B
Ruby

class Champs::CheckboxChamp < Champ
def search_terms
if value == 'on'
[libelle]
end
end
def to_s
value == 'on' ? 'oui' : 'non'
end
end