debian-mirror-gitlab/app/models/bulk_imports/export_upload.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
463 B
Ruby
Raw Permalink Normal View History

2021-06-08 01:23:25 +05:30
# frozen_string_literal: true
module BulkImports
class ExportUpload < ApplicationRecord
include WithUploads
self.table_name = 'bulk_import_export_uploads'
belongs_to :export, class_name: 'BulkImports::Export'
2023-05-27 22:25:52 +05:30
belongs_to :batch, class_name: 'BulkImports::ExportBatch', optional: true
2021-06-08 01:23:25 +05:30
mount_uploader :export_file, ExportUploader
def retrieve_upload(_identifier, paths)
Upload.find_by(model: self, path: paths)
end
end
end