instance method already_scaled?

Ruby on Rails edge

Since edge Private — implementation detail, not part of the public API

Signature

already_scaled?(value)

BigDecimal#round returns an Integer when scale is 0 or less.

Parameters

value req
Source
# File activemodel/lib/active_model/type/decimal.rb, line 118
        def already_scaled?(value)
          scale.positive? && value.is_a?(::BigDecimal) && value.scale.between?(0, scale)
        end

Defined in activemodel/lib/active_model/type/decimal.rb line 118 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveModel::Type::Decimal

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close