From 4e3770b7217d579fffaf303d025ed1a0c6a78c83 Mon Sep 17 00:00:00 2001 From: Tom Lea Date: Fri, 15 Aug 2008 17:13:11 +0100 Subject: [PATCH] Prevented AR.reset_subclasses from killing existing instance's methods and class attributes. --- activerecord/lib/active_record/base.rb | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 2c4ead0..455fc2f 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -405,8 +405,6 @@ module ActiveRecord #:nodoc: nonreloadables << klass next end - klass.instance_variables.each { |var| klass.send(:remove_instance_variable, var) } - klass.instance_methods(false).each { |m| klass.send :undef_method, m } end @@subclasses = {} nonreloadables.each { |klass| (@@subclasses[klass.superclass] ||= []) << klass } -- 1.5.2.4