Class: Decidim::Surveys::CleanSurveyAnswersJob
- Inherits:
-
ApplicationJob
- Object
- ApplicationJob
- Decidim::Surveys::CleanSurveyAnswersJob
- Defined in:
- app/jobs/decidim/surveys/clean_survey_answers_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(_event_name, data) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/jobs/decidim/surveys/clean_survey_answers_job.rb', line 6 def perform(_event_name, data) @component = data[:resource] return unless component&.manifest_name == "surveys" @survey = Survey.find_by(component:) return unless survey&.questionnaire case data[:event_class] when "Decidim::ComponentPublishedEvent" clean_answers end end |