Class: Decidim::Votings::Census::Admin::GenerateAccessCodesJob
- Inherits:
-
ApplicationJob
- Object
- ApplicationJob
- Decidim::Votings::Census::Admin::GenerateAccessCodesJob
- Defined in:
- 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 '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 |