Sha256: 126f98451291aa409e409eafd508eb3f08062d0d0360054d18182d8625ecaa85
Contents?: true
Size: 708 Bytes
Versions: 17
Compression:
Stored size: 708 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" module Decidim module Admin # A concern to help custom importing procedures that do not use the default # importing logic. module CustomImport extend ActiveSupport::Concern include Decidim::ProcessesFileLocally private def process_import_file(blob, &) reader_klass = import_reader_klass_for(blob) process_file_locally(blob) do |file_path| reader = reader_klass.new(file_path) reader.read_rows(&) end end def import_reader_klass_for(blob) Decidim::Admin::Import::Readers.search_by_mime_type(blob.content_type) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems