diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index eb4dc8d81..05291ef1a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -177,7 +177,8 @@ class ApplicationController < ActionController::Base private def set_active_storage_host - ActiveStorage::Current.host = request.base_url + ActiveStorage::Current.url_options ||= {} + ActiveStorage::Current.url_options[:host] = request.base_url end def setup_javascript_settings diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index a45eeceb5..8ccfede35 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -86,7 +86,7 @@ RSpec.configure do |config| ActionMailer::Base.deliveries.clear - ActiveStorage::Current.host = 'http://test.host' + ActiveStorage::Current.url_options = { host: 'http://test.host' } Geocoder.configure(lookup: :test) end