demarches-normaliennes/app/models/champs/checkbox_champ.rb

12 lines
164 B
Ruby
Raw Normal View History

2018-02-13 18:18:20 +01:00
class Champs::CheckboxChamp < Champ
def search_terms
if value == 'on'
[ libelle ]
end
end
def to_s
value == 'on' ? 'oui' : 'non'
end
2018-02-13 18:18:20 +01:00
end