Class: ActiveModel::Type::Decimal
- Includes:
- Helpers::Numeric
- Defined in:
- lib/active_model/type/decimal.rb
Overview
:nodoc:
Constant Summary collapse
- BIGDECIMAL_PRECISION =
18
Instance Attribute Summary
Attributes inherited from Value
Instance Method Summary collapse
Methods included from Helpers::Numeric
Methods inherited from Value
#==, #assert_valid_value, #binary?, #cast, #changed?, #changed_in_place?, #deserialize, #force_equality?, #hash, #immutable_value, #initialize, #map, #serializable?, #serialize, #value_constructed_by_mass_assignment?
Constructor Details
This class inherits a constructor from ActiveModel::Type::Value
Instance Method Details
#type ⇒ Object
11 12 13 |
# File 'lib/active_model/type/decimal.rb', line 11 def type :decimal end |
#type_cast_for_schema(value) ⇒ Object
15 16 17 |
# File 'lib/active_model/type/decimal.rb', line 15 def type_cast_for_schema(value) value.to_s.inspect end |