Class: Decidim::Votings::Census::Dataset

Inherits:
ApplicationRecord show all
Includes:
Loggable, Traceable
Defined in:
decidim-elections/app/models/decidim/votings/census/dataset.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.log_presenter_class_for(_log) ⇒ Object


24
25
26
# File 'decidim-elections/app/models/decidim/votings/census/dataset.rb', line 24

def self.log_presenter_class_for(_log)
  Decidim::Votings::Census::AdminLog::DatasetPresenter
end

Instance Method Details

#access_codes_file(filename) ⇒ Object

Caches a Decidim::VotingCensusUploader with the retrieved file.


29
30
31
32
33
34
# File 'decidim-elections/app/models/decidim/votings/census/dataset.rb', line 29

def access_codes_file(filename)
  @access_codes_file ||= VotingCensusUploader.new(self).tap do |uploader|
    uploader.retrieve_from_store!(filename)
    uploader.cache!(filename)
  end
end