From 1bce58b31289362d62863ad0600b924858a11e34 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Thu, 2 Feb 2006 05:41:00 +0000 Subject: Add Reloadable::OnlySubclasses which handles the common case where a base class should not be reloaded, but its subclasses should be. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/base.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/base.rb') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index f134402c58..aa13dc6d68 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -242,9 +242,10 @@ module ActiveRecord #:nodoc: # Accepts a logger conforming to the interface of Log4r or the default Ruby 1.8+ Logger class, which is then passed # on to any new database connections made and which can be retrieved on both a class and instance level by calling +logger+. cattr_accessor :logger - + + include Reloadable::OnlySubclasses + def self.inherited(child) #:nodoc: - child.send :include, Reloadable @@subclasses[self] ||= [] @@subclasses[self] << child super -- cgit v1.2.3