diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/initializer.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index fedce9c5a7..2fd22f9743 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -72,15 +72,15 @@ module Rails 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! |