Method: Pay::Currency#additional_precision
- Defined in:
- lib/pay/currency.rb
#additional_precision(amount) ⇒ Object
If amount is 0.8, we want to display $0.008
47 48 49 50 |
# File 'lib/pay/currency.rb', line 47 def additional_precision(amount) _, decimals = amount.to_s.split(".") decimals&.length || 0 end |