Add interstitial for Terms of Service updates (#34527)
This commit is contained in:
parent
c4f47adb49
commit
8cc5084ca1
10 changed files with 72 additions and 4 deletions
|
@ -6,6 +6,8 @@ class Admin::DistributeTermsOfServiceNotificationWorker
|
|||
def perform(terms_of_service_id)
|
||||
terms_of_service = TermsOfService.find(terms_of_service_id)
|
||||
|
||||
terms_of_service.scope_for_interstitial.in_batches.update_all(require_tos_interstitial: true)
|
||||
|
||||
terms_of_service.scope_for_notification.find_each do |user|
|
||||
UserMailer.terms_of_service_changed(user, terms_of_service).deliver_later!
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue