heartcombo / devise

Flexible authentication solution for Rails with Warden.
http://blog.plataformatec.com.br/tag/devise/
MIT License
24.02k stars 5.55k forks source link

Devise is loading routes before other engines have a chance to add their routes in Rails 8 #5720

Closed jcoyne closed 2 weeks ago

jcoyne commented 1 month ago

Environment

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.

nashby commented 2 weeks ago

Closing this since https://github.com/rails/rails/pull/53522 was merged. Please let me know if it's still an issue with latest Rails's master.