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 0757b3388f.
Conflicts:
railties/CHANGELOG.md
Since the default in Rails 4.0 is to run in 'threadsafe' mode we need
to eager load all of the paths in `autoload_paths` so we alias
`eager_load_paths` to it. This may have unintended consequences if
you have added 'lib' to `autoload_paths` such as loading unneeded
code or code intended only for development and/or test environments.
If this applies to your application you should thoroughly check what
is being eager loaded.
This reverts commit 29b1dc273e.
Conflicts:
railties/test/application/paths_test.rb
Reason: since 7f96e4317e was reverted,
Path#children is no longer deprecated.
This reverts commit 3663057518.
REASON: This caused a regression that add app folder in the eager load
path. See #8146 for more information.
Conflicts:
railties/CHANGELOG.md
This reverts commit 6acebb38bc.
Usage of this feature did not reveal any improvement in existing apps.
Conflicts:
actionpack/lib/action_dispatch/routing/mapper.rb
guides/source/routing.textile
railties/lib/rails/engine.rb
railties/lib/rails/paths.rb
railties/test/paths_test.rb
This feature enables the ability to load an
external routes file from the router via:
draw :filename
External routes files go in +config/routes+. This
feature works in both engines and applications.
If you have existing Metals, you have a few options:
* if your metal behaves like a middleware, add it to the
middleware stack via config.middleware.use. You can use
methods on the middleware stack to control exactly where
it should go
* if it behaves like a Rack endpoint, you can link to it
in the router. This will result in more optimal routing
time, and allows you to remove code in your endpoint
that matches specific URLs in favor of the more powerful
handling in the router itself.
For the future, you can use ActionController::Metal to get
a very fast controller with the ability to opt-in to specific
controller features without paying the penalty of the full
controller stack.
Since Rails 3 is closer to Rack, the Metal abstraction is
no longer needed.