move BigDecimal.new to BigDecimal()
This commit is contained in:
parent
1b636910ba
commit
b844be7a28
2 changed files with 3 additions and 3 deletions
|
@ -32,8 +32,8 @@ class GroupOrder < ApplicationRecord
|
|||
# Generate some data for the javascript methods in ordering view
|
||||
def load_data
|
||||
data = {}
|
||||
data[:account_balance] = ordergroup.nil? ? BigDecimal.new('+Infinity') : ordergroup.account_balance
|
||||
data[:available_funds] = ordergroup.nil? ? BigDecimal.new('+Infinity') : ordergroup.get_available_funds(self)
|
||||
data[:account_balance] = ordergroup.nil? ? BigDecimal('+Infinity') : ordergroup.account_balance
|
||||
data[:available_funds] = ordergroup.nil? ? BigDecimal('+Infinity') : ordergroup.get_available_funds(self)
|
||||
|
||||
# load prices and other stuff....
|
||||
data[:order_articles] = {}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue