docbrown/config/initializers/authentication.rb
rhymes 36786cf554
Rails 6: enable zeitwerk autoloader (#8766)
* More loading fixes

* Go back to OpenStruct

* Shuffle things around

* Remove obsolete patches and unneeded requires

* Disable config.add_autoload_paths_to_load_path

* Fix pre-require errors

* Config not reloader
2020-06-22 16:27:55 +02:00

8 lines
315 B
Ruby

Rails.application.config.to_prepare do
# We require all authentication modules to make sure providers
# are correctly preloaded and ready to be used at this point as the loading
# order is important
Dir[Rails.root.join("app/services/authentication/**/*.rb")].each do |f|
require_dependency(f)
end
end