Add DecimalNumberChamp
This commit is contained in:
parent
681a2e660d
commit
45bfb2fd47
8 changed files with 50 additions and 0 deletions
7
app/models/champs/decimal_number_champ.rb
Normal file
7
app/models/champs/decimal_number_champ.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
class Champs::DecimalNumberChamp < Champ
|
||||
validates :value, numericality: { allow_nil: true }
|
||||
|
||||
def value_for_export
|
||||
value.to_f
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue