mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 11:57:16 +08:00
12 lines
343 B
Ruby
12 lines
343 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'active_storage/service/disk_service'
|
|
|
|
module ActiveStorage
|
|
class Service::CustomDiskService < Service::DiskService
|
|
def url_options
|
|
ActiveStorage::Current.url_options ||= { host: Rails.application.routes.default_url_options[:host] }
|
|
ActiveStorage::Current.url_options
|
|
end
|
|
end
|
|
end
|