Skip to content

Commit

Permalink
Remove non-exists method delegation and correct doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jasl committed Mar 11, 2017
1 parent 37770bc commit ddb798a
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions activemodel/lib/active_model/type.rb
Expand Up @@ -21,16 +21,8 @@ module Type


class << self class << self
attr_accessor :registry # :nodoc: attr_accessor :registry # :nodoc:
delegate :add_modifier, to: :registry


# Add a new type to the registry, allowing it to be referenced as a # Add a new type to the registry, allowing it to be get through ActiveModel::Type#lookup
# 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.
def register(type_name, klass = nil, **options, &block) def register(type_name, klass = nil, **options, &block)
registry.register(type_name, klass, **options, &block) registry.register(type_name, klass, **options, &block)
end end
Expand Down

0 comments on commit ddb798a

Please sign in to comment.