47d9c79617
This allows us to directly pass entities to the job.
11 lines
312 B
Ruby
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
|