Skip to content

Commit 7abba8d

Browse files
davelooiiMacTia
authored andcommitted
Replace deprecated BigDecimal.new() with BigDecimal() (#50)
1 parent 9c9b5cd commit 7abba8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rails_param/param.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def coerce(param, type, options = {})
123123
end
124124
if type == BigDecimal
125125
param = param.delete('$,').strip.to_f if param.is_a?(String)
126-
return BigDecimal.new(param, (options[:precision] || DEFAULT_PRECISION))
126+
return BigDecimal(param, (options[:precision] || DEFAULT_PRECISION))
127127
end
128128
return nil
129129
rescue ArgumentError

0 commit comments

Comments
 (0)