diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-19 17:34:35 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-19 17:34:35 +0900 |
commit | 2733a68f8b8a0b3ce785d516b0f577b5693cf64b (patch) | |
tree | 809d6f5ca06213c4c56541d8c8fce24e90269964 /activerecord/lib | |
parent | 39de7fac0507070e3c5f8b33fbad6fced84d97ed (diff) | |
download | rails-2733a68f8b8a0b3ce785d516b0f577b5693cf64b.tar.gz rails-2733a68f8b8a0b3ce785d516b0f577b5693cf64b.tar.bz2 rails-2733a68f8b8a0b3ce785d516b0f577b5693cf64b.zip |
Revert renamed `GeneratedAttributeMethods`
This partly reverts 8ca3c286a768038f6b391fd3bfbdfcc299876a1f.
`.is_a?(GeneratedAttributeMethodsBuilder)` doesn't make sense to me, the
module class's `new` creates just an instance of the module class itself.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index af7e46e649..238ea92da4 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -24,7 +24,7 @@ module ActiveRecord RESTRICTED_CLASS_METHODS = %w(private public protected allocate new name parent superclass) - class GeneratedAttributeMethodsBuilder < Module #:nodoc: + class GeneratedAttributeMethods < Module #:nodoc: include Mutex_m end @@ -35,7 +35,7 @@ module ActiveRecord end def initialize_generated_modules # :nodoc: - @generated_attribute_methods = const_set(:GeneratedAttributeMethods, GeneratedAttributeMethodsBuilder.new) + @generated_attribute_methods = const_set(:GeneratedAttributeMethods, GeneratedAttributeMethods.new) private_constant :GeneratedAttributeMethods @attribute_methods_generated = false include @generated_attribute_methods @@ -89,7 +89,7 @@ module ActiveRecord # If ThisClass < ... < SomeSuperClass < ... < Base and SomeSuperClass # defines its own attribute method, then we don't want to overwrite that. defined = method_defined_within?(method_name, superclass, Base) && - ! superclass.instance_method(method_name).owner.is_a?(GeneratedAttributeMethodsBuilder) + ! superclass.instance_method(method_name).owner.is_a?(GeneratedAttributeMethods) defined || super end end |