[Feature proposal] Override controllers in ActiveStorage configuration

Overriding the ActiveStorage controllers to add authentication or customize behavior is a bit tedious because it requires either:

  • using custom routes, which means losing the nice url helpers provided by active storage
  • copy pasting the routes in the application routes.rb, which is not very DRY.

I suggest allowing to configure the names of the controller in the configuration to easily subclass the controllers in your own code without losing the route helpers.

Here’s a PR showing the changes to support discussion: