aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/engine
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2013-02-19 07:22:37 +0000
committerAndrew White <andyw@pixeltrix.co.uk>2013-02-19 07:22:37 +0000
commit9d9b22f47a1928bf2fde3b7b574e3d8d4b1cca92 (patch)
treee0f584955548315c6282721a4c3b8bafddcac993 /railties/lib/rails/engine
parent012213467667a5d4f56761fbc235a3359d95750a (diff)
downloadrails-9d9b22f47a1928bf2fde3b7b574e3d8d4b1cca92.tar.gz
rails-9d9b22f47a1928bf2fde3b7b574e3d8d4b1cca92.tar.bz2
rails-9d9b22f47a1928bf2fde3b7b574e3d8d4b1cca92.zip
Revert "Deprecate the `eager_load_paths` configuration"
Because of the possibility of lib being unintentionally eager loaded it's been agreed that we'll leave autoload paths and eager load paths separate for Rails 4.0. This reverts commit 0757b3388ffe4f44b60de950d40e18ef05055931. Conflicts: railties/CHANGELOG.md
Diffstat (limited to 'railties/lib/rails/engine')
-rw-r--r--railties/lib/rails/engine/configuration.rb24
1 files changed, 9 insertions, 15 deletions
diff --git a/railties/lib/rails/engine/configuration.rb b/railties/lib/rails/engine/configuration.rb
index 2b23d8be38..10d1821709 100644
--- a/railties/lib/rails/engine/configuration.rb
+++ b/railties/lib/rails/engine/configuration.rb
@@ -4,7 +4,7 @@ module Rails
class Engine
class Configuration < ::Rails::Railtie::Configuration
attr_reader :root
- attr_writer :middleware, :autoload_once_paths, :autoload_paths
+ attr_writer :middleware, :eager_load_paths, :autoload_once_paths, :autoload_paths
def initialize(root=nil)
super()
@@ -39,16 +39,16 @@ module Rails
@paths ||= begin
paths = Rails::Paths::Root.new(@root)
- paths.add "app", autoload: true, glob: "*"
+ paths.add "app", eager_load: true, glob: "*"
paths.add "app/assets", glob: "*"
- paths.add "app/controllers", autoload: true
- paths.add "app/helpers", autoload: true
- paths.add "app/models", autoload: true
- paths.add "app/mailers", autoload: true
+ paths.add "app/controllers", eager_load: true
+ paths.add "app/helpers", eager_load: true
+ paths.add "app/models", eager_load: true
+ paths.add "app/mailers", eager_load: true
paths.add "app/views"
- paths.add "app/controllers/concerns", autoload: true
- paths.add "app/models/concerns", autoload: true
+ paths.add "app/controllers/concerns", eager_load: true
+ paths.add "app/models/concerns", eager_load: true
paths.add "lib", load_path: true
paths.add "lib/assets", glob: "*"
@@ -76,13 +76,7 @@ module Rails
end
def eager_load_paths
- ActiveSupport::Deprecation.warn "eager_load_paths is deprecated and all autoload_paths are now eagerly loaded."
- autoload_paths
- end
-
- def eager_load_paths=(paths)
- ActiveSupport::Deprecation.warn "eager_load_paths is deprecated and all autoload_paths are now eagerly loaded."
- self.autoload_paths = paths
+ @eager_load_paths ||= paths.eager_load
end
def autoload_once_paths