2018-02-13 18:18:20 +01:00
|
|
|
class Champs::CheckboxChamp < Champ
|
2018-07-25 19:34:06 +02:00
|
|
|
def search_terms
|
|
|
|
if value == 'on'
|
2018-12-24 17:29:46 +01:00
|
|
|
[libelle]
|
2018-07-25 19:34:06 +02:00
|
|
|
end
|
|
|
|
end
|
2018-08-08 15:39:18 +02:00
|
|
|
|
|
|
|
def to_s
|
2018-12-28 15:58:17 +01:00
|
|
|
value == 'on' ? 'Oui' : 'Non'
|
2018-08-08 15:39:18 +02:00
|
|
|
end
|
2018-12-28 15:54:40 +01:00
|
|
|
|
|
|
|
def for_export
|
|
|
|
value == 'on' ? 'on' : 'off'
|
|
|
|
end
|
2018-12-28 18:05:10 +01:00
|
|
|
|
|
|
|
def for_api
|
|
|
|
value == 'on' ? 'on' : 'off'
|
|
|
|
end
|
2018-02-13 18:18:20 +01:00
|
|
|
end
|