Sha256: 31473e5b2cd1ffe5ead43d4e4cdd52327a936f8bd19ba7c1bdd5bfae775b563c
Contents?: true
Size: 626 Bytes
Versions: 48
Compression:
Stored size: 626 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) CSV.foreach(report_file_path, headers: true, header_converters: :symbol) do |row| klass.create_or_update_from_csv(row, account_id) end end end end end
Version data entries
48 entries across 48 versions & 1 rubygems