chore: fix ActiveStorage::Current.host deprecation warning

This commit is contained in:
Colin Darie 2023-11-10 13:30:43 +01:00
parent 8326cf080e
commit 25dfbe5085
No known key found for this signature in database
GPG key ID: 8C76CADD40253590
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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