aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-01-25 18:20:23 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-01-25 18:20:23 +0000
commitbe80d460f7389d3b5db7248cc4fb726fa61db4e4 (patch)
treece32727bbd72d6444b9f4755a481d1bbad0c46d3 /activesupport
parent20b14e0d3809d9af8e53dcf598a74362adbd7439 (diff)
downloadrails-be80d460f7389d3b5db7248cc4fb726fa61db4e4.tar.gz
rails-be80d460f7389d3b5db7248cc4fb726fa61db4e4.tar.bz2
rails-be80d460f7389d3b5db7248cc4fb726fa61db4e4.zip
Moved subclass reloading responsibilities to Dependencies
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@509 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/dependencies.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/dependencies.rb b/activesupport/lib/dependencies.rb
index 3ceec71873..e5e806b65a 100644
--- a/activesupport/lib/dependencies.rb
+++ b/activesupport/lib/dependencies.rb
@@ -35,6 +35,10 @@ module Dependencies
def require_or_load(file_name)
load? ? load("#{file_name}.rb") : require(file_name)
end
+
+ def remove_subclasses_for(*classes)
+ classes.each { |klass| klass.remove_subclasses }
+ end
end
Object.send(:define_method, :require_or_load) { |file_name| Dependencies.require_or_load(file_name) } unless Object.respond_to?(:require_or_load)