diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-23 19:42:40 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-23 19:42:40 +0000 |
commit | 0942bfa7a96e981bf146dee1ad32fa81e68ee6e6 (patch) | |
tree | f0ee569fd26d01a14d714fd40ed27db1dd5206f6 /activesupport | |
parent | 95454bfb33a9b29703dbbf04d1a71d06a68ae787 (diff) | |
download | rails-0942bfa7a96e981bf146dee1ad32fa81e68ee6e6.tar.gz rails-0942bfa7a96e981bf146dee1ad32fa81e68ee6e6.tar.bz2 rails-0942bfa7a96e981bf146dee1ad32fa81e68ee6e6.zip |
Brought back reloading of models
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@478 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/dependencies.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/lib/dependencies.rb b/activesupport/lib/dependencies.rb index c47faad38d..4f4dfa4a71 100644 --- a/activesupport/lib/dependencies.rb +++ b/activesupport/lib/dependencies.rb @@ -29,6 +29,12 @@ module Dependencies self.loaded = [ ] end + def reload + old_loaded = loaded.dup + clear + old_loaded.each { |file_name| depend_on(file_name, true) } + end + private def require_or_load(file_name) mechanism == :load ? silence_warnings { load("#{file_name}.rb") } : require(file_name) |