module ActiveStorage::Attached::Model

def validate_service_configuration(association_name, service)

def validate_service_configuration(association_name, service)
  if service.present?
    ActiveStorage::Blob.services.fetch(service) do
      raise ArgumentError, "Cannot configure service :#{service} for #{name}##{association_name}"
    end
  end
end