Skip to Content Skip to Search
v7.1.0
module ActiveModel::Type
Methods
R

Public class methods

register(type_name, klass = nil, &block)

Permalink

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
Definition files
19 More Less