foodsoft/app/jobs/notify_negative_balance_job.rb
Patrick Gansterer 47d9c79617 Use ActiveJob instead of Resque directly
This allows us to directly pass entities to the job.
2021-03-08 12:30:58 +01:00

11 lines
312 B
Ruby

class NotifyNegativeBalanceJob < ApplicationJob
def perform(ordergroup, transaction)
ordergroup.users.each do |user|
next unless user.settings.notify['negative_balance']
Mailer.deliver_now_with_user_locale user do
Mailer.negative_balance(user, transaction)
end
end
end
end