instance method
already_scaled?
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
already_scaled?(value)
BigDecimal#round returns an Integer when scale is 0 or less.
Parameters
-
valuereq
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