The ActiveStorage tests explicitly state that an exception should be raised if ActiveStorage::Current.url_options is unset.
This is fine and I get why this makes sense for ActiveStorage.
What I don’t understand is why ActiveStorage::Current.url_options are not per default set to the details of the current request ({ protocol: request.protocol, host: request.host, port: request.port }) in ActionController::Base of a Rails app so that all controllers have the opportunity to easily generate ActiveStorage URLs.
Can someone explain me the reasoning behind this?
Alternatively if we cannot configure a default url_options, could we at least adjust the rails new generator to include ActiveStorage::SetCurrent in the ApplicationController if ActiveStorage is included in the project?