instance method
apply_scale
Ruby on Rails edge
Since v7.1.6 Private — implementation detail, not part of the public APISignature
apply_scale(value)
No documentation comment.
Parameters
-
valuereq
Source
# File activemodel/lib/active_model/type/decimal.rb, line 109
def apply_scale(value)
if scale && !already_scaled?(value)
value.round(scale)
else
value
end
end
Defined in activemodel/lib/active_model/type/decimal.rb line 109
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Type::Decimal