Permalink
Browse files

apply [5801] to 1.2 stable branch

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-pre-release@5802 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 59be73a commit 7269ee2da98d33373e8f24b7ad932633a874db1f @technoweenie technoweenie committed Dec 27, 2006
Showing with 8 additions and 4 deletions.
  1. +5 −0 railties/CHANGELOG
  2. +3 −4 railties/lib/initializer.rb
View
@@ -1,5 +1,10 @@
*SVN*
+* Ensure plugins are in the Dependencies.load_once_paths collection by default. [Rick]
+ If you really want your plugins to reload, add this to the very top of init.rb:
+
+ Dependencies.load_once_paths.delete(lib_path)
+
* Fix scaffold_resource generator so it respects the --pretend argument when creating the routes file. Closes #6852 [fearoffish]
* Fix Webrick Daemon dispatching bug regarding a bad current working directory. Closes #4899 [Rick Olson]
@@ -388,6 +388,7 @@ def load_plugin(directory)
application_lib_index = $LOAD_PATH.index(File.join(RAILS_ROOT, "lib")) || 0
$LOAD_PATH.insert(application_lib_index + 1, lib_path)
Dependencies.load_paths << lib_path
+ Dependencies.load_once_paths << lib_path
end
# Allow plugins to reference the current configuration object
@@ -611,11 +612,9 @@ def default_load_paths
paths.concat builtin_directories
end
+ # Doesn't matter since plugins aren't in load_paths yet.
def default_load_once_paths
- plugin_root = "#{root_path}/vendor/plugins/"
- default_load_paths.select do |path|
- path[0, plugin_root.length] == plugin_root # No begins_with yet
- end
+ []
end
def default_log_path

0 comments on commit 7269ee2

Please sign in to comment.