module
ActiveModel::Type
Methods
- R
Public class methods
Add a new type to the registry, allowing it to be referenced as a symbol by attribute.
Source code GitHub
# File activemodel/lib/active_model/type.rb, line 30
def register(type_name, klass = nil, &block)
registry.register(type_name, klass, &block)
end
Namespace
-
MODULE
ActiveModel::Type:: Helpers -
MODULE
ActiveModel::Type:: SerializeCastValue -
CLASS
ActiveModel::Type:: BigInteger -
CLASS
ActiveModel::Type:: Binary -
CLASS
ActiveModel::Type:: Boolean -
CLASS
ActiveModel::Type:: Date -
CLASS
ActiveModel::Type:: DateTime -
CLASS
ActiveModel::Type:: Decimal -
CLASS
ActiveModel::Type:: Float -
CLASS
ActiveModel::Type:: ImmutableString -
CLASS
ActiveModel::Type:: Integer -
CLASS
ActiveModel::Type:: String -
CLASS
ActiveModel::Type:: Time -
CLASS
ActiveModel::Type:: Value
Definition files
activemodel/lib/ active_model/ type.rb activemodel/lib/ active_model/ type/ big_integer.rb activemodel/lib/ active_model/ type/ binary.rb activemodel/lib/ active_model/ type/ boolean.rb activemodel/lib/ active_model/ type/ date.rb
19 More Less
activemodel/lib/ active_model/ type/ date_time.rb activemodel/lib/ active_model/ type/ decimal.rb activemodel/lib/ active_model/ type/ float.rb activemodel/lib/ active_model/ type/ helpers/ accepts_multiparameter_time.rb activemodel/lib/ active_model/ type/ helpers/ mutable.rb activemodel/lib/ active_model/ type/ helpers/ numeric.rb activemodel/lib/ active_model/ type/ helpers/ time_value.rb activemodel/lib/ active_model/ type/ helpers/ timezone.rb activemodel/lib/ active_model/ type/ immutable_string.rb activemodel/lib/ active_model/ type/ integer.rb activemodel/lib/ active_model/ type/ registry.rb activemodel/lib/ active_model/ type/ serialize_cast_value.rb activemodel/lib/ active_model/ type/ string.rb activemodel/lib/ active_model/ type/ time.rb activemodel/lib/ active_model/ type/ value.rb activerecord/lib/ active_record/ attribute_methods/ query.rb activerecord/lib/ active_record/ message_pack.rb activerecord/lib/ active_record/ normalization.rb activerecord/lib/ active_record/ type/ serialized.rb