module Decidim::Admin::Import::Readers
Constants
- ACCEPTED_MIME_TYPES
Accepted mime types keys: are used for dynamic help text on admin form. values: are used to validate the file format of imported document.
Public Class Methods
all()
click to toggle source
# File lib/decidim/admin/import/readers.rb, line 21 def self.all [ Readers::CSV, Readers::JSON, Readers::XLS ] end
search_by_mime_type(mime_type)
click to toggle source
# File lib/decidim/admin/import/readers.rb, line 29 def self.search_by_mime_type(mime_type) all.each do |reader_klass| return reader_klass if mime_type == reader_klass::MIME_TYPE end nil end