Explicitly use the default storage service

This commit is contained in:
Stanko K.R.
2026-02-02 15:22:16 +01:00
parent 60c63271b9
commit 1bc1b68ddf
@@ -6,4 +6,17 @@ class Account::DataTransfer::ActiveStorageBlobRecordSet < Account::DataTransfer:
attributes: ActiveStorage::Blob.column_names - %w[service_name]
)
end
private
def import_batch(files)
batch_data = files.map do |file|
data = load(file)
data.slice(*attributes).merge(
"account_id" => account.id,
"service_name" => ActiveStorage::Blob.service.name
)
end
model.insert_all!(batch_data)
end
end