Namespace
Module
Class
- ActiveModel::Type::Boolean
- ActiveModel::Type::Registration
- ActiveModel::Type::Registry
- ActiveModel::Type::Value
Methods
Class Public methods
register(type_name, klass = nil, **options, &block)
Add a new type to the registry, allowing it to be gotten through ActiveModel::Type#lookup
📝 Source code
# File activemodel/lib/active_model/type.rb, line 28
def register(type_name, klass = nil, **options, &block)
registry.register(type_name, klass, **options, &block)
end
🔎 See on GitHub