From 7277c518912e08d125cef0f0a890a72bd7283cf5 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 19 Dec 2006 19:47:21 +0000 Subject: Partially revert [5660] - makes more trouble than it resolves. References #5704, closes #6766. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5753 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/base.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'activerecord/lib') 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). -- cgit v1.2.3