This project is archived and is in readonly mode.
App routes.rb not loaded when both engine and inflections present
-
Thijs
- Tag changed from engines, routing to 2.3, engines, routing
I digged in a little deeper and found the cause of this issue: initialize_routing in railties/lib/initializer.rb calls the reload method without a bang.
The reload method in ActionController::Routing::RouteSet checks the last modification date of the route files and this halts the reloading of the routes if they're older than @routes_last_modified.
Because the inflections calls the reload! method, I think before initialize_routing is called, initialize_routing messes up the routes in this scenario.
I don't think I fully understand what's causing this exactly, but this problem can be fixed by changing line 495 of railties/lib/initializer.rb from:
ActionController::Routing::Routes.reload
to:
ActionController::Routing::Routes.reload!
-
DHH
- Milestone cleared.
-
Repository
- State changed from new to committed
(from [b61cad6ae140bc71c6a74b22c75e886b41154b0a]) Ensure that the app routes file is loaded even when engines are in play (Thjis) [#1970 state:committed] http://github.com/rails/rails/co...
