提交 98939553 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #28356 from jasl/patch-1

Remove non-exists method delegation
......@@ -21,16 +21,8 @@ module Type
class << self
attr_accessor :registry # :nodoc:
delegate :add_modifier, to: :registry
# Add a new type to the registry, allowing it to be referenced as a
# symbol by ActiveRecord::Attributes::ClassMethods#attribute. If your
# type is only meant to be used with a specific database adapter, you can
# do so by passing +adapter: :postgresql+. If your type has the same
# name as a native type for the current adapter, an exception will be
# raised unless you specify an +:override+ option. +override: true+ will
# cause your type to be used instead of the native type. +override:
# false+ will cause the native type to be used over yours if one exists.
# Add a new type to the registry, allowing it to be get through ActiveModel::Type#lookup
def register(type_name, klass = nil, **options, &block)
registry.register(type_name, klass, **options, &block)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册