864bb38d8a
Otherwise, we return nil instead of “off” / “non”, so we don’t expose the data properly
19 lines
273 B
Ruby
19 lines
273 B
Ruby
class Champs::CheckboxChamp < Champ
|
|
def search_terms
|
|
if value == 'on'
|
|
[libelle]
|
|
end
|
|
end
|
|
|
|
def to_s
|
|
value == 'on' ? 'Oui' : 'Non'
|
|
end
|
|
|
|
def for_export
|
|
value == 'on' ? 'on' : 'off'
|
|
end
|
|
|
|
def for_api
|
|
value == 'on' ? 'on' : 'off'
|
|
end
|
|
end
|