aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-03-13 21:41:08 -0400
committerGitHub <noreply@github.com>2017-03-13 21:41:08 -0400
commit9893955363cf6358556ed3b36f4538d5b54e9d17 (patch)
treedaaf0c31ca9f730dbbb7a69d60b9c8ef72b1cac2
parente2e63770f59ce4585944447ee237ec722761e77d (diff)
parentddb798acaab48bc0ed278c9f3c1ace78722e4217 (diff)
downloadrails-9893955363cf6358556ed3b36f4538d5b54e9d17.tar.gz
rails-9893955363cf6358556ed3b36f4538d5b54e9d17.tar.bz2
rails-9893955363cf6358556ed3b36f4538d5b54e9d17.zip
Merge pull request #28356 from jasl/patch-1
Remove non-exists method delegation
-rw-r--r--activemodel/lib/active_model/type.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/activemodel/lib/active_model/type.rb b/activemodel/lib/active_model/type.rb
index b8e6d2376b..095801d8f0 100644
--- a/activemodel/lib/active_model/type.rb
+++ b/activemodel/lib/active_model/type.rb
@@ -21,16 +21,8 @@ module ActiveModel
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