Permalink
Browse files

prepend to load path before loading the plugin

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2466 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 7a854b5 commit 445873af19208b048a2304b08d5a69285ff3a6b7 @jamis jamis committed Oct 5, 2005
Showing with 4 additions and 4 deletions.
  1. +4 −4 railties/lib/initializer.rb
@@ -72,15 +72,15 @@ def load_plugins
Dir.glob("#{configuration.plugins_path}/*") do |directory|
next if File.basename(directory)[0] == ?. || !File.directory?(directory)
+ if File.directory?("#{directory}/lib")
+ $LOAD_PATH.unshift "#{directory}/lib"
+ end
+
if File.exist?("#{directory}/init.rb")
silence_warnings do
eval(IO.read("#{directory}/init.rb"), binding)
end
end
-
- if File.directory?("#{directory}/lib")
- $LOAD_PATH.unshift "#{directory}/lib"
- end
end
$LOAD_PATH.uniq!

0 comments on commit 445873a

Please sign in to comment.