devise
devise copied to clipboard
Devise is loading routes before other engines have a chance to add their routes in Rails 8
Environment
- Ruby 3.3.5
- Rails 8.0.0.beta1
- Devise 4.9.4
Current behavior
In rails 8.0, when ENV['CI'] is true, Rails does config.eager_load = true. This triggers this code in devise:
https://github.com/heartcombo/devise/blob/main/lib/devise/rails.rb#L15-L18
If there are other engines like propshaft that want to add routes, this prevents them since routes are only loaded once.
Expected behavior
The routes for all engines should be loaded when config.eager_load = true.