Replace gsub with tr for better performance

This commit is contained in:
Maciej Szlosarczyk 2018-08-16 13:33:09 +03:00
parent c028c0e477
commit 066123bcf7
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765

View file

@ -29,7 +29,7 @@ class Deposit
def amount
return BigDecimal('0.0') if @amount.blank?
BigDecimal(@amount.to_s.gsub(/,/, '.'), 10)
BigDecimal(@amount.to_s.tr(',', '.'), 10)
end
def issue_prepayment_invoice