diff options
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index b0ff70e5af..4c51d3f3ee 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -816,7 +816,7 @@ module ActiveRecord #:nodoc: end def descends_from_active_record? # :nodoc: - superclass.abstract_class? || !columns_hash.include?(inheritance_column) + superclass == Base || !columns_hash.include?(inheritance_column) end @@ -1360,7 +1360,7 @@ module ActiveRecord #:nodoc: # Returns the class descending directly from ActiveRecord in the inheritance hierarchy. def class_of_active_record_descendant(klass) - if klass.superclass.abstract_class? + if klass.superclass == Base || klass.superclass.abstract_class? klass elsif klass.superclass.nil? raise ActiveRecordError, "#{name} doesn't belong in a hierarchy descending from ActiveRecord" @@ -1481,9 +1481,6 @@ module ActiveRecord #:nodoc: end end - # ActiveRecord::Base is abstract. - self.abstract_class = true - public # New objects can be instantiated as either empty (pass no construction parameter) or pre-set with # attributes but not yet saved (pass a hash with key names matching the associated table column names). |