Remove the proxy value_for_export method

Overload for_export instead
This commit is contained in:
gregoirenovel 2018-12-28 15:46:38 +01:00
parent 7cd50531cf
commit 9e42190148
8 changed files with 24 additions and 28 deletions

View file

@ -1,7 +1,7 @@
class Champs::DecimalNumberChamp < Champ
validates :value, numericality: { allow_nil: true, allow_blank: true }
def value_for_export
value.to_f
def for_export
value.present? ? value.to_f : nil
end
end