So, you’d then want to add complexity to that to say when autoloading, ensure that if there is another autoloaded directory under that directory, then ignore that directory when autoloading the higher level autoloaded directory.
Sorry, wasn’t thinking. Since the constants would be loaded in a prior autoload path, it wouldn’t attempt to load them again. I’ll try to be helpful:
In config/application.rb, you’d just:
config.autoload_paths += %W(#{config.root}/app/views/helpers)
if you want to remove the old autoload dir then also add:
config.eager_load_paths -= %W(#{config.root}/app/helpers)
then at command-line:
mkdir app/views/helpers
mv app/helpers/* app/views/helpers/
rmdir app/helpers
then:
rails c
and autoload_paths is the first of the autoload paths evaluated you can see from evaluating:
MyRailsApp::Application._all_autoload_paths
But, Rails generators and any other gems that create helpers may expect the app/helpers path to exist, be writable, and/or be autoloaded.
So, you could symlink app/helpers to app/views/helpers or remove app/helpers and then do pull requests for gems/etc. as they break.
You could also suggest making each of the autoload paths configurable in Rails, but, like I said, you’d have compatibility issues with gems that mod or read files in autoloaded dirs like annotate, modelist, etc. so probably a no-go.