Class: Decidim::Votings::Census::Admin::GenerateAccessCodesJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
decidim-elections/app/jobs/decidim/votings/census/admin/generate_access_codes_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(dataset, user) ⇒ Object


10
11
12
13
14
15
16
# File 'decidim-elections/app/jobs/decidim/votings/census/admin/generate_access_codes_job.rb', line 10

def perform(dataset, user)
  return unless user_valid?(user) && dataset_valid?(dataset)

  generate_access_codes(dataset)

  update_dataset_status(dataset, :codes_generated, user)
end