Skip to content

Commit

Permalink
Revert "files in the lib directory are no longer autoloaded"
Browse files Browse the repository at this point in the history
This patch is not consistent since it leaves similar
directories in load_paths, needs more thought.

This reverts commit b5fe014.
  • Loading branch information
fxn committed Jun 20, 2010
1 parent 7b7cedc commit b311dbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 1 addition & 5 deletions railties/lib/rails/engine/configuration.rb
Expand Up @@ -20,19 +20,15 @@ def paths
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
Expand Down
4 changes: 1 addition & 3 deletions railties/test/application/initializers/load_path_test.rb
Expand Up @@ -19,7 +19,7 @@ def setup
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
Expand Down Expand Up @@ -60,8 +60,6 @@ module Zoo::ReptileHouse ; end

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

Expand Down

0 comments on commit b311dbb

Please sign in to comment.