demarches-normaliennes/app/models/champs/checkbox_champ.rb
2019-01-29 15:23:09 +01:00

9 lines
138 B
Ruby

class Champs::CheckboxChamp < Champs::YesNoChamp
def true?
value == 'on'
end
def for_export
true? ? 'on' : 'off'
end
end