docbrown/config/initializers/zeitwerk.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

15 lines
628 B
Ruby

# Zeitwerk (Rails 6+) autoloader
# see https://guides.rubyonrails.org/autoloading_and_reloading_constants.html
# Configures default inflections for the zeitwerk autoloader
# see <https://guides.rubyonrails.org/autoloading_and_reloading_constants.html#customizing-inflections>
Rails.autoloaders.each do |autoloader|
autoloader.inflector.inflect(
"html_rouge" => "HTMLRouge",
"url" => "URL",
)
end
# Ignoring folders that don't adhere to the new naming conventions
Rails.autoloaders.main.ignore(Rails.root.join("lib/data_update_scripts"))
Rails.autoloaders.main.ignore(Rails.root.join("lib/generators/data_update"))