Sha256: 6dc435df8c6c4966b0a9aacc2d02157bfa93891b6dd1c63dbebc92fb05de870f
Contents?: true
Size: 644 Bytes
Versions: 14
Compression:
Stored size: 644 Bytes
Contents
module CanvasSync module Importers class LegacyImporter # Does a legacy style import, row by row. This will be invoked if you passed # "legacy_support: true" when starting the sync. For this to work your models # must have a `create_or_update_from_csv` class method defined. # # @param report_file_path [String] # @param klass [Object] def self.import(report_file_path, klass, account_id, options) CSV.foreach(report_file_path, headers: true, header_converters: :symbol) do |row| klass.create_or_update_from_csv(row, account_id, options) end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems