1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Revert "files in the lib directory are no longer autoloaded"

This patch is not consistent since it leaves similar
directories in load_paths, needs more thought.

This reverts commit b5fe014fdc.
This commit is contained in:
Xavier Noria 2010-06-21 01:46:24 +02:00
parent 7b7cedcb8d
commit b311dbb0ba
2 changed files with 2 additions and 8 deletions

View file

@ -20,19 +20,15 @@ module Rails
paths.app.models "app/models", :eager_load => true
paths.app.mailers "app/mailers", :eager_load => true
paths.app.views "app/views"
paths.lib "lib"
paths.lib "lib", :load_path => true
paths.lib.tasks "lib/tasks", :glob => "**/*.rake"
paths.config "config"
paths.config.initializers "config/initializers", :glob => "**/*.rb"
paths.config.locales "config/locales", :glob => "*.{rb,yml}"
paths.config.routes "config/routes.rb"
paths.public "public"
paths.public.javascripts "public/javascripts"
paths.public.stylesheets "public/stylesheets"
paths
end
end

View file

@ -19,7 +19,7 @@ module ApplicationTests
assert $:.include?("#{app_path}/app/models")
end
test "initializing an application allows to load code on lib path inside application class definition" do
test "initializing an application allows to load code on lib path inside application class definitation" do
app_file "lib/foo.rb", <<-RUBY
module Foo; end
RUBY
@ -60,8 +60,6 @@ module ApplicationTests
add_to_config <<-RUBY
config.root = "#{app_path}"
config.cache_classes = true
config.load_paths << "#{app_path}/lib"
config.eager_load_paths << "#{app_path}/lib"
RUBY