diff options
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 81683b7dae..b5d2129fba 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -258,6 +258,10 @@ module ActiveRecord #:nodoc: end def self.reset_subclasses + subclasses.each do |klass| + klass.instance_variables.each { |var| klass.send(:remove_instance_variable, var) } + klass.instance_methods(false).each { |m| klass.send :undef_method, m } + end @@subclasses.clear end |