Class: SurveyCheckWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Job
Defined in:
app/workers/survey_check_worker.rb

Instance Method Summary collapse

Instance Method Details

#performObject



6
7
8
9
10
11
# File 'app/workers/survey_check_worker.rb', line 6

def perform
  # Delete all enrollments that have no answers in it
  SurveyEnrollment.all.each do |se|
    se.destroy! if se.customer_topics.joins(:topic_responses).empty?
  end
end