Make the CheckboxChamp export similar to YesNoChamp
Previously, nil values would be returned as nil and not as off
This commit is contained in:
parent
4a6930b60a
commit
f27717ab23
1 changed files with 4 additions and 0 deletions
|
@ -8,4 +8,8 @@ class Champs::CheckboxChamp < Champ
|
||||||
def to_s
|
def to_s
|
||||||
value == 'on' ? 'oui' : 'non'
|
value == 'on' ? 'oui' : 'non'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def for_export
|
||||||
|
value == 'on' ? 'on' : 'off'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue