demarches-normaliennes/app/models/champs/decimal_number_champ.rb
2018-11-06 11:28:44 +01:00

7 lines
144 B
Ruby

class Champs::DecimalNumberChamp < Champ
validates :value, numericality: { allow_nil: true }
def value_for_export
value.to_f
end
end