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

14 lines
204 B
Ruby
Raw Normal View History

2018-02-13 18:18:20 +01:00
class Champs::YesNoChamp < Champs::CheckboxChamp
def search_terms
if value == 'true'
[ libelle ]
end
end
private
def value_for_export
value == 'true' ? 'oui' : 'non'
end
2018-02-13 18:18:20 +01:00
end