Sha256: 2cbdb39c8f6cd2f9eb538446764efaf371cd3f79f068d8f4ec4c7c1803949092

Contents?: true

Size: 507 Bytes

Versions: 17

Compression:

Stored size: 507 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

17 entries across 17 versions & 1 rubygems

Version Path
zizia-6.0.1 app/models/zizia/csv_import.rb
zizia-6.0.0 app/models/zizia/csv_import.rb
zizia-5.5.0 app/models/zizia/csv_import.rb
zizia-5.4.0 app/models/zizia/csv_import.rb
zizia-5.3.0 app/models/zizia/csv_import.rb
zizia-5.2.0 app/models/zizia/csv_import.rb
zizia-5.1.0 app/models/zizia/csv_import.rb
zizia-5.0.1 app/models/zizia/csv_import.rb
zizia-5.0.0 app/models/zizia/csv_import.rb
zizia-4.6.0.alpha.01 app/models/zizia/csv_import.rb
zizia-4.5.4.alpha.01 app/models/zizia/csv_import.rb
zizia-4.5.3.alpha.01 app/models/zizia/csv_import.rb
zizia-4.5.2.alpha.01 app/models/zizia/csv_import.rb
zizia-4.5.1.alpha.01 app/models/zizia/csv_import.rb
zizia-4.4.1.alpha.01 app/models/zizia/csv_import.rb
zizia-4.4.0.alpha.01 app/models/zizia/csv_import.rb
zizia-4.3.1.alpha.01 app/models/zizia/csv_import.rb