diff options
author | Bogdan Gusiev <agresso@gmail.com> | 2018-04-02 14:17:24 +0300 |
---|---|---|
committer | Bogdan Gusiev <agresso@gmail.com> | 2018-04-02 14:34:32 +0300 |
commit | 0d9f45ff99c092cce6b7642f653b8fdf9f930f0c (patch) | |
tree | 9d98aa6242dde4a480b2543961b6b8498b6233ab /activerecord/lib/active_record/attribute_methods.rb | |
parent | 09b2348f7fc8d4e7191e70e06608c5909067e2aa (diff) | |
download | rails-0d9f45ff99c092cce6b7642f653b8fdf9f930f0c.tar.gz rails-0d9f45ff99c092cce6b7642f653b8fdf9f930f0c.tar.bz2 rails-0d9f45ff99c092cce6b7642f653b8fdf9f930f0c.zip |
Add AR::Base.base_class? predicate
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods.rb')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index 7db9bbe46b..83b5a5e698 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -59,7 +59,7 @@ module ActiveRecord # attribute methods. generated_attribute_methods.synchronize do return false if @attribute_methods_generated - superclass.define_attribute_methods unless self == base_class + superclass.define_attribute_methods unless base_class? super(attribute_names) @attribute_methods_generated = true end |