foodsoft/app/jobs/notify_negative_balance_job.rb

12 lines
312 B
Ruby
Raw Normal View History

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