0
0
Fork 0

Add terms of service (#33055)

This commit is contained in:
Eugen Rochko 2024-12-09 11:04:46 +01:00 committed by GitHub
parent 7a2a345c08
commit 30aa0df88c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
129 changed files with 1456 additions and 238 deletions

View file

@ -0,0 +1,15 @@
# frozen_string_literal: true
class Admin::DistributeTermsOfServiceNotificationWorker
include Sidekiq::Worker
def perform(terms_of_service_id)
terms_of_service = TermsOfService.find(terms_of_service_id)
terms_of_service.scope_for_notification.find_each do |user|
UserMailer.terms_of_service_changed(user, terms_of_service).deliver_later!
end
rescue ActiveRecord::RecordNotFound
true
end
end