Sha256: 2db02da9333dfa00343d88999acb235d060cf0663d1441a9eae5c3d9c64342bd

Contents?: true

Size: 505 Bytes

Versions: 15

Compression:

Stored size: 505 Bytes

Contents

# frozen_string_literal: true

module Zizia
  class CsvImport < ApplicationRecord
    belongs_to :user

    # This is where the CSV file is stored:
    mount_uploader :manifest, CsvManifestUploader

    delegate :warnings, to: :manifest, prefix: true

    delegate :errors, to: :manifest, prefix: true

    delegate :records, to: :manifest, prefix: true

    def queue_start_job
      StartCsvImportJob.perform_later(id)
      # TODO: We'll probably need to store job_id on this record.
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
zizia-4.2.0.alpha.01 app/models/zizia/csv_import.rb
zizia-4.1.0.alpha.01 app/models/zizia/csv_import.rb
zizia-4.0.4.alpha.01 app/models/zizia/csv_import.rb
zizia-3.1.0.alpha.01 app/models/zizia/csv_import.rb
zizia-3.0.0.alpha.01 app/models/zizia/csv_import.rb
zizia-2.1.0.alpha.09 app/models/zizia/csv_import.rb
zizia-2.1.0.alpha.08 app/models/zizia/csv_import.rb
zizia-2.1.0.alpha.07 app/models/zizia/csv_import.rb
zizia-2.1.0.alpha.06 app/models/zizia/csv_import.rb
zizia-2.1.0.alpha.05 app/models/zizia/csv_import.rb
zizia-2.1.0.alpha.04 app/models/zizia/csv_import.rb
zizia-2.1.0.alpha.03 app/models/zizia/csv_import.rb
zizia-2.1.0.alpha.02 app/models/zizia/csv_import.rb
zizia-2.1.0.alpha.01 app/models/zizia/csv_import.rb
zizia-2.0.0.alpha.01 app/models/zizia/csv_import.rb