move BigDecimal.new to BigDecimal()

This commit is contained in:
viehlieb 2023-02-14 12:25:41 +01:00 committed by Philipp Rothmann
parent 782194cd08
commit 91a38bc73b
2 changed files with 3 additions and 3 deletions

View file

@ -3,7 +3,7 @@ class String
# remove comma from decimal inputs
def self.delocalized_decimal(string)
if !string.blank? and string.is_a?(String)
BigDecimal.new(string.sub(',', '.'))
BigDecimal(string.sub(',', '.'))
else
string
end